Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4184,6 +4184,13 @@ fn test_linux(target: &str) {
cfg.skip_const(move |constant| {
let name = constant.ident();

// FIXME(linux): Requires newer kernel headers than CI has, even on glibc,
// so skip on every libc until CI catches up. OPEN_TREE_NAMESPACE landed in
// v7.0, FSCONFIG_CMD_CREATE_EXCL in v6.6.
if name == "OPEN_TREE_NAMESPACE" || name == "FSCONFIG_CMD_CREATE_EXCL" {
return true;
}

// L4Re requires a min stack size of 64k; that isn't defined in uClibc, but
// somewhere in the core libraries. uClibc wants 16k, but that's not enough.
if l4re && name == "PTHREAD_STACK_MIN" {
Expand All @@ -4206,6 +4213,10 @@ fn test_linux(target: &str) {
|| name.starts_with("EPOLL")
|| name.starts_with("F_")
|| name.starts_with("FALLOC_FL_")
|| name.starts_with("FSCONFIG_")
|| name.starts_with("FSMOUNT_")
|| name.starts_with("FSOPEN_")
|| name.starts_with("FSPICK_")
|| name.starts_with("IFLA_")
|| name.starts_with("KEXEC_")
|| name.starts_with("MS_")
Expand Down
16 changes: 16 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,21 @@ FIONCLEX
FIONREAD
FLUSHO
FOPEN_MAX
FSCONFIG_CMD_CREATE
FSCONFIG_CMD_CREATE_EXCL
FSCONFIG_CMD_RECONFIGURE
FSCONFIG_SET_BINARY
FSCONFIG_SET_FD
FSCONFIG_SET_FLAG
FSCONFIG_SET_PATH
FSCONFIG_SET_PATH_EMPTY
FSCONFIG_SET_STRING
FSMOUNT_CLOEXEC
FSOPEN_CLOEXEC
FSPICK_CLOEXEC
FSPICK_EMPTY_PATH
FSPICK_NO_AUTOMOUNT
FSPICK_SYMLINK_NOFOLLOW
FS_IOC32_GETFLAGS
FS_IOC32_GETVERSION
FS_IOC32_SETFLAGS
Expand Down Expand Up @@ -2196,6 +2211,7 @@ OFILL
OLCUC
OPEN_TREE_CLOEXEC
OPEN_TREE_CLONE
OPEN_TREE_NAMESPACE
O_ASYNC
O_DIRECT
O_DSYNC
Expand Down
21 changes: 21 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3106,8 +3106,29 @@ pub const IN_NONBLOCK: c_int = O_NONBLOCK;

// uapi/linux/mount.h
pub const OPEN_TREE_CLONE: c_uint = 0x01;
pub const OPEN_TREE_NAMESPACE: c_uint = 0x02;
pub const OPEN_TREE_CLOEXEC: c_uint = O_CLOEXEC as c_uint;

pub const FSOPEN_CLOEXEC: c_uint = 0x00000001;

pub const FSPICK_CLOEXEC: c_uint = 0x00000001;
pub const FSPICK_SYMLINK_NOFOLLOW: c_uint = 0x00000002;
pub const FSPICK_NO_AUTOMOUNT: c_uint = 0x00000004;
pub const FSPICK_EMPTY_PATH: c_uint = 0x00000008;

pub const FSMOUNT_CLOEXEC: c_uint = 0x00000001;

// enum fsconfig_command
pub const FSCONFIG_SET_FLAG: c_uint = 0;
pub const FSCONFIG_SET_STRING: c_uint = 1;
pub const FSCONFIG_SET_BINARY: c_uint = 2;
pub const FSCONFIG_SET_PATH: c_uint = 3;
pub const FSCONFIG_SET_PATH_EMPTY: c_uint = 4;
pub const FSCONFIG_SET_FD: c_uint = 5;
pub const FSCONFIG_CMD_CREATE: c_uint = 6;
pub const FSCONFIG_CMD_RECONFIGURE: c_uint = 7;
pub const FSCONFIG_CMD_CREATE_EXCL: c_uint = 8;

// uapi/linux/netfilter/nf_tables.h
pub const NFT_TABLE_MAXNAMELEN: c_int = 256;
pub const NFT_CHAIN_MAXNAMELEN: c_int = 256;
Expand Down
Loading