diff --git a/src/basic/linux/README b/src/basic/linux/README index 1abc9450a6b..790b4feb0ae 100644 --- a/src/basic/linux/README +++ b/src/basic/linux/README @@ -5,3 +5,4 @@ modifications are applied: - btrfs.h: drop '__user' attributes - if.h: drop '#include ' and '__user' attributes - stddef.h: drop '#include ' +- guard linux/fs.h include to avoid conflict with glibc 2.36 diff --git a/src/basic/linux/btrfs.h b/src/basic/linux/btrfs.h index 0a53bdc38a8..74ed9088bd2 100644 --- a/src/basic/linux/btrfs.h +++ b/src/basic/linux/btrfs.h @@ -26,7 +26,9 @@ extern "C" { #include #include +#if WANT_LINUX_FS_H #include +#endif #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_VOL_NAME_MAX 255 diff --git a/src/basic/linux/update.sh b/src/basic/linux/update.sh index 6aff039d3ef..6155766aaf8 100755 --- a/src/basic/linux/update.sh +++ b/src/basic/linux/update.sh @@ -7,4 +7,5 @@ for i in *.h */*.h; do curl --fail "https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i" -o "$i" sed -r -i -e 's/__user //g' -e '/^#include / d' "$i" + sed -r -i 's/^(#include )/#if WANT_LINUX_FS_H\n\1\n#endif/' "$i" done