]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: update to build new libmount
authorKarel Zak <kzak@redhat.com>
Tue, 22 Nov 2022 11:11:07 +0000 (12:11 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/meson.build
meson.build

index 1367ab291ee6073f46db965e10b0d96ef3483931..4764fcd70fd3268863021bd1491179820dc86dbb 100644 (file)
@@ -38,17 +38,20 @@ lib_mount_sources = '''
 
 if LINUX
   lib_mount_sources += '''
-    src/context.c
-    src/context_loopdev.c
-    src/context_veritydev.c
-    src/context_mount.c
-    src/context_umount.c
-    src/hook_mount_legacy.c
-    src/hook_mkdir.c
+    src/hooks.c
+    src/monitor.c
+    src/optlist.c
+    src/hook_veritydev.c
     src/hook_subdir.c
     src/hook_owner.c
+    src/hook_mount.c
+    src/hook_mount_legacy.c
+    src/hook_mkdir.c
+    src/hook_loopdev.c
     src/hook_idmap.c
-    src/monitor.c
+    src/context_umount.c
+    src/context_mount.c
+    src/context.c
 '''.split()
 endif
 
index 694f6f3814e1cc0baeec22f6b26e7d042261e584..c1ff7605d1027ae4b707b615790128e97ecd849e 100644 (file)
@@ -77,9 +77,14 @@ build_libuuid = not get_option('build-libuuid').disabled()
 conf.set('HAVE_LIBUUID', build_libuuid ? 1 : false)
 summary('libuuid', build_libuuid ? 'enabled' : 'disabled', section : 'components')
 
+have_mountfd_api = cc.sizeof('struct mount_attr', prefix : '#include <linux/mount.h>') > 0
+conf.set('HAVE_STRUCT_MOUNT_ATTR', have_mountfd_api ? 1 : false)
+conf.set('HAVE_MOUNTFD_API', have_mountfd_api ? 1 : false)
+
 build_libmount = not get_option('build-libmount').disabled()
 conf.set('HAVE_LIBMOUNT', build_libmount ? 1 : false)
 conf.set('USE_LIBMOUNT_SUPPORT_NAMESPACES', 1)
+conf.set('USE_LIBMOUNT_MOUNTFD_SUPPORT', have_mountfd_api ? 1 : false)
 summary('libmount', build_libmount ? 'enabled' : 'disabled', section : 'components')
 
 build_libsmartcols = not get_option('build-libsmartcols').disabled()
@@ -589,11 +594,9 @@ have = cc.has_member('struct tm', 'tm_gmtoff',
 conf.set('HAVE_TM_GMTOFF', have ? 1 : false)
 
 
-have = cc.sizeof('struct mount_attr', prefix : '#include <linux/mount.h>') > 0
-conf.set('HAVE_STRUCT_MOUNT_ATTR', have ? 1 : false)
 
 have = cc.sizeof('enum fsconfig_command', prefix : '#include <linux/mount.h>') > 0
-conf.set('HAVE_ENUM_FSCONFIG_COMMANS', have ? 1 : false)
+conf.set('HAVE_ENUM_FSCONFIG_COMMAND', have ? 1 : false)
 
 have = cc.has_member('struct termios', 'c_line',
                      prefix : '#include <termios.h>')