[LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files

Petr Vorel pvorel@suse.cz
Fri Aug 5 09:38:23 CEST 2022


Hi Li,

> The latest glibc added new wrappers (e.g. mount_setattr, fsopen) support in
> sys/mount.h, which partly conflicts with linux/mount.h at the same time.

> We need to make adjustments to header files to fix compiling error on
> different platforms.
thanks for fixing this!

Reviewed-by: Petr Vorel <pvorel@suse.cz>
LGTM, with suggestion.

> +#include <sys/mount.h>
>  #include "tst_test.h"
>  #include "lapi/fsmount.h"
How about instead adding it to the tests to add it to lapi/fsmount.h ?

#include <sys/mount.h>
#ifndef HAVE_FSOPEN
# ifdef HAVE_LINUX_MOUNT_H
#  include <linux/mount.h>
# endif

Works on rawhide
https://github.com/pevik/ltp/actions/runs/2802006779
and on the rest
https://github.com/pevik/ltp/actions/runs/2801968366

and my branch li/fix-compiling-errors.fixes

Kind regards,
Petr


More information about the ltp mailing list