1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

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>
This commit is contained in:
Rudi Heitbaum 2023-01-31 12:06:56 +00:00 committed by Luca Boccassi
parent 49bb7fe5f8
commit 1bb6ba08b1
3 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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