mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-13 12:38:05 +00:00
build: check for FS_CONFIG_* header symbol in sys/mount.h
Fixes: #4176 Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
This commit is contained in:
parent
ef1e0607b8
commit
cbabe8abf1
59
meson.build
59
meson.build
@ -639,8 +639,7 @@ if cc.sizeof('struct mount_attr', prefix: decl_headers, args: '-D_GNU_SOURCE') >
|
|||||||
found_types += 'struct mount_attr (sys/mount.h)'
|
found_types += 'struct mount_attr (sys/mount.h)'
|
||||||
else
|
else
|
||||||
srcconf.set10('HAVE_' + 'struct mount_attr'.underscorify().to_upper(), false)
|
srcconf.set10('HAVE_' + 'struct mount_attr'.underscorify().to_upper(), false)
|
||||||
missing_types += 'struct mount_attr (sys/mount.h)'
|
missing_types += 'struct mount_attr (sys/mount.h)' endif
|
||||||
endif
|
|
||||||
|
|
||||||
## Types.
|
## Types.
|
||||||
decl_headers = '''
|
decl_headers = '''
|
||||||
@ -656,6 +655,62 @@ else
|
|||||||
missing_types += 'struct mount_attr (linux/mount.h)'
|
missing_types += 'struct mount_attr (linux/mount.h)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')
|
||||||
|
srcconf.set10('HAVE_' + 'FSCONFIG_SET_FLAG'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FSCONFIG_SET_FLAG'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FSCONFIG_SET_FLAG'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FSCONFIG_SET_FLAG'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_STRING')
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_STRING'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FS_CONFIG_SET_STRING'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_STRING'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FS_CONFIG_SET_STRING'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_BINARY')
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_BINARY'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FS_CONFIG_SET_BINARY'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_BINARY'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FS_CONFIG_SET_BINARY'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_PATH_EMPTY')
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_EMPTY'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FS_CONFIG_SET_PATH_EMPTY'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_EMPTY'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FS_CONFIG_SET_PATH_EMPTY'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_PATH_FD')
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_FD'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FS_CONFIG_SET_PATH_FD'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_FD'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FS_CONFIG_SET_PATH_FD'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_CMD_CREATE')
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_CREATE'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FS_CONFIG_SET_CMD_CREATE'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_CREATE'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FS_CONFIG_SET_CMD_CREATE'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_CMD_RECONFIGURE')
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_RECONFIGURE'.underscorify().to_upper(), true)
|
||||||
|
found_types += 'FS_CONFIG_SET_CMD_RECONFIGURE'
|
||||||
|
else
|
||||||
|
srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_RECONFIGURE'.underscorify().to_upper(), false)
|
||||||
|
missing_types += 'FS_CONFIG_SET_CMD_RECONFIGURE'
|
||||||
|
endif
|
||||||
|
|
||||||
## Headers.
|
## Headers.
|
||||||
foreach ident: [
|
foreach ident: [
|
||||||
['bpf', '''#include <sys/syscall.h>
|
['bpf', '''#include <sys/syscall.h>
|
||||||
|
@ -82,37 +82,53 @@ struct lxc_rootfs;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* fsconfig() commands */
|
/* fsconfig() commands */
|
||||||
|
#if !HAVE_FSCONFIG_SET_FLAG
|
||||||
#ifndef FSCONFIG_SET_FLAG
|
#ifndef FSCONFIG_SET_FLAG
|
||||||
#define FSCONFIG_SET_FLAG 0 /* Set parameter, supplying no value */
|
#define FSCONFIG_SET_FLAG 0 /* Set parameter, supplying no value */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_FSCONFIG_SET_STRING
|
||||||
#ifndef FSCONFIG_SET_STRING
|
#ifndef FSCONFIG_SET_STRING
|
||||||
#define FSCONFIG_SET_STRING 1 /* Set parameter, supplying a string value */
|
#define FSCONFIG_SET_STRING 1 /* Set parameter, supplying a string value */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_FSCONFIG_SET_BINARY
|
||||||
#ifndef FSCONFIG_SET_BINARY
|
#ifndef FSCONFIG_SET_BINARY
|
||||||
#define FSCONFIG_SET_BINARY 2 /* Set parameter, supplying a binary blob value */
|
#define FSCONFIG_SET_BINARY 2 /* Set parameter, supplying a binary blob value */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_FSCONFIG_SET_PATH
|
||||||
#ifndef FSCONFIG_SET_PATH
|
#ifndef FSCONFIG_SET_PATH
|
||||||
#define FSCONFIG_SET_PATH 3 /* Set parameter, supplying an object by path */
|
#define FSCONFIG_SET_PATH 3 /* Set parameter, supplying an object by path */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_FSCONFIG_SET_PATH_EMPTY
|
||||||
#ifndef FSCONFIG_SET_PATH_EMPTY
|
#ifndef FSCONFIG_SET_PATH_EMPTY
|
||||||
#define FSCONFIG_SET_PATH_EMPTY 4 /* Set parameter, supplying an object by (empty) path */
|
#define FSCONFIG_SET_PATH_EMPTY 4 /* Set parameter, supplying an object by (empty) path */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_FSCONFIG_SET_FD
|
||||||
#ifndef FSCONFIG_SET_FD
|
#ifndef FSCONFIG_SET_FD
|
||||||
#define FSCONFIG_SET_FD 5 /* Set parameter, supplying an object by fd */
|
#define FSCONFIG_SET_FD 5 /* Set parameter, supplying an object by fd */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_FSCONFIG_CMD_CREATE
|
||||||
#ifndef FSCONFIG_CMD_CREATE
|
#ifndef FSCONFIG_CMD_CREATE
|
||||||
#define FSCONFIG_CMD_CREATE 6 /* Invoke superblock creation */
|
#define FSCONFIG_CMD_CREATE 6 /* Invoke superblock creation */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !FSCONFIG_CMD_RECONFIGURE
|
||||||
#ifndef FSCONFIG_CMD_RECONFIGURE
|
#ifndef FSCONFIG_CMD_RECONFIGURE
|
||||||
#define FSCONFIG_CMD_RECONFIGURE 7 /* Invoke superblock reconfiguration */
|
#define FSCONFIG_CMD_RECONFIGURE 7 /* Invoke superblock reconfiguration */
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* fsmount() flags */
|
/* fsmount() flags */
|
||||||
#ifndef FSMOUNT_CLOEXEC
|
#ifndef FSMOUNT_CLOEXEC
|
||||||
|
Loading…
Reference in New Issue
Block a user