public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] configure.ac: fix mount_attr detection
@ 2023-02-26 19:25 Fabrice Fontaine
  2023-02-27 11:28 ` Cyril Hrubis
  0 siblings, 1 reply; 10+ messages in thread
From: Fabrice Fontaine @ 2023-02-26 19:25 UTC (permalink / raw)
  To: ltp; +Cc: Fabrice Fontaine

Commit b857f8723f30a4b9554bf6b0ff8fa52fd07e8b60 tried to fix build with
latest glibc which provides mount_attr in sys/mount.h. Unfortunately,
the following build failure is still raised because sys/mount is now
unconditionally included in include/lapi/fsmount.h:

In file included from fsconfig01.c:9:
../../../../include/lapi/fsmount.h:55:8: error: redefinition of 'struct mount_attr'
   55 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from ../../../../include/lapi/fsmount.h:14:
/home/autobuild/autobuild/instance-4/output-1/host/armeb-buildroot-linux-gnueabi/sysroot/usr/include/sys/mount.h:210:8: note: originally defined here
  210 | struct mount_attr
      |        ^~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/4dbb72e1bf081afd3cd944571b9beeefc7608865

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index c2b0f48e7..a6d8ac826 100644
--- a/configure.ac
+++ b/configure.ac
@@ -225,10 +225,10 @@ AC_CHECK_TYPES([struct __kernel_old_timeval, struct __kernel_old_timespec, struc
 
 AC_CHECK_TYPES([struct futex_waitv],,,[#include <linux/futex.h>])
 AC_CHECK_TYPES([struct mount_attr],,,[
-#ifdef HAVE_LINUX_MOUNT_H
-# include <linux/mount.h>
-#else
+#ifdef HAVE_MOUNT_SETATTR
 # include <sys/mount.h>
+#elif HAVE_LINUX_MOUNT_H
+# include <linux/mount.h>
 #endif
 ])
 
-- 
2.39.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-20 14:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 19:25 [LTP] [PATCH] configure.ac: fix mount_attr detection Fabrice Fontaine
2023-02-27 11:28 ` Cyril Hrubis
2023-03-09 10:56   ` Petr Vorel
2023-03-09 13:09     ` Li Wang
2023-03-09 13:00   ` Li Wang
2023-03-10  6:25   ` Li Wang
2023-03-10  9:31     ` Petr Vorel
2023-03-10  9:42       ` Li Wang
2023-03-10 11:42         ` Petr Vorel
2023-03-20 14:59           ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox