From: Karel Zak Date: Tue, 31 May 2022 15:27:04 +0000 (+0200) Subject: build-sys: check for mount_attr in linux/mount.h X-Git-Tag: v2.39-rc1~338 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10efb9ea92128c2461d00c67397a42d90abf8909;p=thirdparty%2Futil-linux.git build-sys: check for mount_attr in linux/mount.h Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index 432f7e7250..9f15648f12 100644 --- a/configure.ac +++ b/configure.ac @@ -498,7 +498,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [AC_DEFINE([HAVE_TM_GMTOFF], [1], [Does struct tm have a field tm_gmtoff?]) ]) -AC_CHECK_TYPES([struct mount_attr], [], [], [[#include ]]) +AC_CHECK_TYPES([struct mount_attr], [], [], [[#include ]]) AC_CHECK_MEMBERS([struct termios.c_line],,, [[#include ]]) diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h index 4d3396ec41..b461104768 100644 --- a/include/mount-api-utils.h +++ b/include/mount-api-utils.h @@ -3,6 +3,7 @@ #if defined(__linux__) #include +#include /* * Scope all of this beneath mount_setattr(). If this syscall is available all diff --git a/meson.build b/meson.build index 24e75839f2..a145dbeb27 100644 --- a/meson.build +++ b/meson.build @@ -499,8 +499,11 @@ funcs = ''' newlocale mempcpy mkostemp + move_mount + mount_setattr nanosleep ntp_gettime + open_tree personality pidfd_open pidfd_send_signal @@ -581,6 +584,10 @@ have = cc.has_member('struct tm', 'tm_gmtoff', ''') conf.set('HAVE_TM_GMTOFF', have ? 1 : false) + +have = cc.sizeof('struct mount_attr', prefix : '#include ') > 0 +conf.set('HAVE_STRUCT_MOUNT_ATTR', have ? 1 : false) + have = cc.has_member('struct termios', 'c_line', prefix : '#include ') conf.set('HAVE_STRUCT_TERMIOS_C_LINE', have ? 1 : false)