From 10efb9ea92128c2461d00c67397a42d90abf8909 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 31 May 2022 17:27:04 +0200 Subject: [PATCH] build-sys: check for mount_attr in linux/mount.h Signed-off-by: Karel Zak --- configure.ac | 2 +- include/mount-api-utils.h | 1 + meson.build | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) 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) -- 2.47.2