[LTP] [PATCH] configure.ac: Fix redefinition of mount_attr by checking sys/mount.h

Petr Vorel pvorel@suse.cz
Mon Sep 26 21:26:33 CEST 2022


Hi Marcos,

> mount_setattr and mount_attr are defined in sys/mount.h.

> Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
> ---
>  Tested on openSUSE Tumbleweed

>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)

> diff --git a/configure.ac b/configure.ac
> index 1deeffc0c..0e9895415 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \
>      sys/epoll.h \
>      sys/fanotify.h \
>      sys/inotify.h \
> +    sys/mount.h \

Well, we don't add check for this, as sys/mount.h has been here since "ever", so
it'd just make configure little bit slower for no gain.

But you'd have to use somewhere compiler macro #ifdef HAVE_SYS_MOUNT_H, as this
macro is generated by configure script. Adding header to the list does nothing.

You obviously wanted to fix something, could you post the problem you're trying
to solve + steps you did to ML?

BTW I have no problem to build locally on the latest Tumbleweed. Also LTP
package build for Tumbleweed is also fine:
https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Factory
https://build.opensuse.org/package/binaries/benchmark:ltp:devel/ltp/openSUSE_Tumbleweed

Kind regards,
Petr


More information about the ltp mailing list