configure: Expose MOUNT_ATTR_IDMAP detection result to C code
authorRogerio Guerra Borin <rogerio.borin@toradex.com>
Wed, 7 Feb 2024 03:19:45 +0000 (00:19 -0300)
committerRogerio Guerra Borin <rogerio.borin@toradex.com>
Mon, 12 Feb 2024 17:52:26 +0000 (14:52 -0300)
This is to allow compiling composefs on machines having somewhat old
Linux kernel headers.

Signed-off-by: Rogerio Guerra Borin <rogerio.borin@toradex.com>
configure.ac

index 5e90c559ea97780c5f4fa0f23c634de394a6e8ff..c534ec73bf71d6c04f24317f237bbddd1b0ddafc 100644 (file)
@@ -295,7 +295,8 @@ AC_COMPILE_IFELSE(
   ],[int foo = MOUNT_ATTR_IDMAP;]
        )],
        [AC_MSG_RESULT(yes)
-        have_mount_attr_idmap=yes],
+               AC_DEFINE([HAVE_MOUNT_ATTR_IDMAP], 1, [Define if MOUNT_ATTR_IDMAP is available in linux/mount.h])
+               have_mount_attr_idmap=yes],
        [AC_MSG_RESULT(no)])
 dnl These are needed by libcomposefs to use the new mount API optionally
 AC_MSG_CHECKING([for new mount API (fsconfig)])