1
0
mirror of https://github.com/systemd/systemd synced 2024-07-08 20:15:55 +00:00

glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36

This commit is contained in:
Rudi Heitbaum 2022-07-23 10:38:49 +00:00 committed by Yu Watanabe
parent 7c35b78a0b
commit 3657d3a01c
4 changed files with 18 additions and 1 deletions

View File

@ -511,7 +511,6 @@ decl_headers = '''
#include <uchar.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/fs.h>
'''
foreach decl : ['char16_t',
@ -523,6 +522,17 @@ foreach decl : ['char16_t',
# We get -1 if the size cannot be determined
have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
if decl == 'struct mount_attr'
if have
want_linux_fs_h = false
else
have = cc.sizeof(decl,
prefix : decl_headers + '#include <linux/fs.h>',
args : '-D_GNU_SOURCE') > 0
want_linux_fs_h = have
endif
endif
if decl == 'struct statx'
if have
want_linux_stat_h = false
@ -538,6 +548,7 @@ foreach decl : ['char16_t',
endforeach
conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
conf.set10('WANT_LINUX_FS_H', want_linux_fs_h)
foreach ident : ['secure_getenv', '__secure_getenv']
conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))

View File

@ -3,7 +3,9 @@
#include <errno.h>
#include <fcntl.h>
#include <linux/btrfs.h>
#if WANT_LINUX_FS_H
#include <linux/fs.h>
#endif
#include <linux/magic.h>
#include <sys/ioctl.h>
#include <sys/resource.h>

View File

@ -7,7 +7,9 @@
#include <sys/file.h>
#include <sys/mount.h>
#include <unistd.h>
#if WANT_LINUX_FS_H
#include <linux/fs.h>
#endif
#include "alloc-util.h"
#include "base-filesystem.h"

View File

@ -7,7 +7,9 @@
#include <sys/statvfs.h>
#include <unistd.h>
#include <linux/loop.h>
#if WANT_LINUX_FS_H
#include <linux/fs.h>
#endif
#include "alloc-util.h"
#include "chase-symlinks.h"