diff options
author | Rudi Heitbaum <rudi@heitbaum.com> | 2023-01-31 13:06:56 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-02-01 01:02:41 +0100 |
commit | 1bb6ba08b128d62acdbbc566d60a054ff5bb9565 (patch) | |
tree | 0e1ed00873dc563323e3aca8c72d88bf9d95e18f /src/basic/linux | |
parent | sysusers: insist that root group is 0 (diff) | |
download | systemd-1bb6ba08b128d62acdbbc566d60a054ff5bb9565.tar.xz systemd-1bb6ba08b128d62acdbbc566d60a054ff5bb9565.zip |
glibc: Conditionally #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
Diffstat (limited to 'src/basic/linux')
-rw-r--r-- | src/basic/linux/README | 1 | ||||
-rw-r--r-- | src/basic/linux/btrfs.h | 2 | ||||
-rwxr-xr-x | src/basic/linux/update.sh | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/linux/README b/src/basic/linux/README index 1abc9450a6..790b4feb0a 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 <linux/compiler.h>' and '__user' attributes - stddef.h: drop '#include <linux/compiler_types.h>' +- 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 0a53bdc38a..74ed9088bd 100644 --- a/src/basic/linux/btrfs.h +++ b/src/basic/linux/btrfs.h @@ -26,7 +26,9 @@ extern "C" { #include <linux/types.h> #include <linux/ioctl.h> +#if WANT_LINUX_FS_H #include <linux/fs.h> +#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 6aff039d3e..6155766aaf 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 <linux\/compiler(_types)?.h>/ d' "$i" + sed -r -i 's/^(#include <linux\/fs\.h>)/#if WANT_LINUX_FS_H\n\1\n#endif/' "$i" done |