gh-83714: Check for struct statx members in configure (#140402)
Some systems have the definitions of the mask bits without having the corresponding members in struct statx. Add configure checks for members added after Linux 4.11 (when statx itself was added).
This commit is contained in:
11
configure.ac
11
configure.ac
@@ -5827,6 +5827,17 @@ AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_passwd], [], [], [[
|
||||
AC_CHECK_MEMBERS([siginfo_t.si_band], [], [], [[@%:@include <signal.h>]])
|
||||
|
||||
if test "$ac_cv_func_statx" = yes; then
|
||||
# Some systems have the definitions of the mask bits without having the
|
||||
# corresponding members in struct statx. Check for members added after Linux
|
||||
# 4.11 (when statx itself was added).
|
||||
AC_CHECK_MEMBERS([struct statx.stx_mnt_id])
|
||||
AC_CHECK_MEMBERS([struct statx.stx_dio_mem_align])
|
||||
# stx_dio_offset_align was added together with stx_dio_mem_align
|
||||
AC_CHECK_MEMBERS([struct statx.stx_subvol])
|
||||
AC_CHECK_MEMBERS([struct statx.stx_atomic_write_unit_min])
|
||||
# stx_atomic_write_unit_max and stx_atomic_write_segments_max were added
|
||||
# together with stx_atomic_write_unit_min
|
||||
AC_CHECK_MEMBERS([struct statx.stx_dio_read_offset_align])
|
||||
# stx_atomic_write_unit_max_opt was added in Linux 6.16, but is controlled by
|
||||
# the STATX_WRITE_ATOMIC mask bit added in Linux 6.11, so having the mask bit
|
||||
# doesn't imply having the member.
|
||||
|
||||
Reference in New Issue
Block a user