mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
This commit is contained in:
parent
7c35b78a0b
commit
3657d3a01c
13
meson.build
13
meson.build
|
@ -511,7 +511,6 @@ decl_headers = '''
|
||||||
#include <uchar.h>
|
#include <uchar.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <linux/fs.h>
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
foreach decl : ['char16_t',
|
foreach decl : ['char16_t',
|
||||||
|
@ -523,6 +522,17 @@ foreach decl : ['char16_t',
|
||||||
# We get -1 if the size cannot be determined
|
# We get -1 if the size cannot be determined
|
||||||
have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
|
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 decl == 'struct statx'
|
||||||
if have
|
if have
|
||||||
want_linux_stat_h = false
|
want_linux_stat_h = false
|
||||||
|
@ -538,6 +548,7 @@ foreach decl : ['char16_t',
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
|
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']
|
foreach ident : ['secure_getenv', '__secure_getenv']
|
||||||
conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
|
conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <linux/btrfs.h>
|
#include <linux/btrfs.h>
|
||||||
|
#if WANT_LINUX_FS_H
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#endif
|
||||||
#include <linux/magic.h>
|
#include <linux/magic.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#if WANT_LINUX_FS_H
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "base-filesystem.h"
|
#include "base-filesystem.h"
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <linux/loop.h>
|
#include <linux/loop.h>
|
||||||
|
#if WANT_LINUX_FS_H
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "chase-symlinks.h"
|
#include "chase-symlinks.h"
|
||||||
|
|
Loading…
Reference in a new issue