Skip to content
Merged
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
13 changes: 0 additions & 13 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,19 +767,6 @@ pub const O_ACCMODE: c_int = 3;
pub const ST_RELATIME: c_ulong = 4096;
pub const NI_MAXHOST: crate::socklen_t = 1025;

// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
// following are only available on newer Linux versions than the versions
// currently used in CI in some configurations, so we define them here.
cfg_if! {
if #[cfg(not(target_arch = "s390x"))] {
pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70;
pub const XFS_SUPER_MAGIC: c_long = 0x58465342;
} else if #[cfg(target_arch = "s390x")] {
pub const BINDERFS_SUPER_MAGIC: c_uint = 0x6c6f6f70;
pub const XFS_SUPER_MAGIC: c_uint = 0x58465342;
}
}

pub const CPU_SETSIZE: c_int = 0x400;

pub const PTRACE_TRACEME: c_uint = 0;
Expand Down
14 changes: 14 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,20 @@ pub const IN_ONLYDIR: u32 = 0x0100_0000;
pub const IN_DONT_FOLLOW: u32 = 0x0200_0000;
pub const IN_EXCL_UNLINK: u32 = 0x0400_0000;

// uapi/linux/magic.h
// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
// following are only available on newer Linux versions than the versions
// currently used in CI in some configurations, so we define them here.
cfg_if! {
if #[cfg(not(target_arch = "s390x"))] {
pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70;
pub const XFS_SUPER_MAGIC: c_long = 0x58465342;
} else if #[cfg(target_arch = "s390x")] {
pub const BINDERFS_SUPER_MAGIC: c_uint = 0x6c6f6f70;
pub const XFS_SUPER_MAGIC: c_uint = 0x58465342;
}
}

// uapi/linux/securebits.h
const SECURE_NOROOT: c_int = 0;
const SECURE_NOROOT_LOCKED: c_int = 1;
Expand Down
6 changes: 0 additions & 6 deletions src/unix/linux_like/linux/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,6 @@ pub const MCL_ONFAULT: c_int = 0x0004;

pub const AF_VSOCK: c_int = 40;

// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
// following are only available on newer Linux versions than the versions
// currently used in CI in some configurations, so we define them here.
pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70;
pub const XFS_SUPER_MAGIC: c_long = 0x58465342;

pub const PTRACE_TRACEME: c_int = 0;
pub const PTRACE_PEEKTEXT: c_int = 1;
pub const PTRACE_PEEKDATA: c_int = 2;
Expand Down