summaryrefslogtreecommitdiffstats
path: root/src/basic/linux
diff options
context:
space:
mode:
authorRudi Heitbaum <rudi@heitbaum.com>2023-01-31 13:06:56 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2023-02-01 01:02:41 +0100
commit1bb6ba08b128d62acdbbc566d60a054ff5bb9565 (patch)
tree0e1ed00873dc563323e3aca8c72d88bf9d95e18f /src/basic/linux
parentsysusers: insist that root group is 0 (diff)
downloadsystemd-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/README1
-rw-r--r--src/basic/linux/btrfs.h2
-rwxr-xr-xsrc/basic/linux/update.sh1
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