Skip to content

Commit

Permalink
Merge pull request #3882 from tgross35/main-parsnip
Browse files Browse the repository at this point in the history
[main] Apply two pull requests to main
  • Loading branch information
tgross35 authored Aug 29, 2024
2 parents 7051191 + b4f6886 commit 56e06a7
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3839,6 +3839,10 @@ fn test_linux(target: &str) {
if name.starts_with("NI_IDN") {
return true;
}
// FIXME: Requires >= 6.3 kernel headers
if name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" {
return true;
}
}
match name {
// These constants are not available if gnu headers have been included
Expand Down Expand Up @@ -4049,6 +4053,9 @@ fn test_linux(target: &str) {
if musl => true,
"CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true,

// FIXME: Requires >= 6.3 kernel headers
"MFD_EXEC" | "MFD_NOEXEC_SEAL" if sparc64 => true,

// kernel 6.1 minimum
"MADV_COLLAPSE" => true,

Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,9 @@ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ
MFD_ALLOW_SEALING
MFD_CLOEXEC
MFD_EXEC
MFD_HUGETLB
MFD_NOEXEC_SEAL
MINIX2_SUPER_MAGIC
MINIX2_SUPER_MAGIC2
MINIX_SUPER_MAGIC
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,9 @@ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ
MFD_ALLOW_SEALING
MFD_CLOEXEC
MFD_EXEC
MFD_HUGETLB
MFD_NOEXEC_SEAL
MINSIGSTKSZ
MMAP_PAGE_ZERO
MNT_DETACH
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ IPTOS_ECN_ECT0
IPTOS_ECN_ECT1
IPTOS_ECN_MASK
IPTOS_ECN_NOTECT
IPV6_DONTFRAG
IPV6_JOIN_GROUP
IPV6_LEAVE_GROUP
IPV6_PKTINFO
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/openbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ IPTOS_ECN_ECT0
IPTOS_ECN_ECT1
IPTOS_ECN_MASK
IPTOS_ECN_NOTECT
IPV6_DONTFRAG
IPV6_JOIN_GROUP
IPV6_LEAVE_GROUP
IPV6_PKTINFO
Expand Down
1 change: 0 additions & 1 deletion src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4132,7 +4132,6 @@ pub const IPV6_RECVHOPLIMIT: ::c_int = 37;
pub const IPV6_PKTINFO: ::c_int = 46;
pub const IPV6_HOPLIMIT: ::c_int = 47;
pub const IPV6_RECVPKTINFO: ::c_int = 61;
pub const IPV6_DONTFRAG: ::c_int = 62;
pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 70;
pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 71;
pub const IP_BLOCK_SOURCE: ::c_int = 72;
Expand Down
1 change: 0 additions & 1 deletion src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,6 @@ pub const IPV6_PKTINFO: ::c_int = 46;
pub const IPV6_HOPLIMIT: ::c_int = 47;
pub const IPV6_RECVTCLASS: ::c_int = 57;
pub const IPV6_TCLASS: ::c_int = 61;
pub const IPV6_DONTFRAG: ::c_int = 62;
pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 70;
pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 71;
pub const IP_BLOCK_SOURCE: ::c_int = 72;
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ pub const IPV6_MULTICAST_IF: ::c_int = 9;
pub const IPV6_MULTICAST_HOPS: ::c_int = 10;
pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
pub const IPV6_V6ONLY: ::c_int = 27;
pub const IPV6_DONTFRAG: ::c_int = 62;

pub const IPTOS_ECN_NOTECT: u8 = 0x00;
pub const IPTOS_ECN_MASK: u8 = 0x03;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2271,6 +2271,8 @@ pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
pub const MFD_HUGETLB: ::c_uint = 0x0004;
pub const MFD_NOEXEC_SEAL: ::c_uint = 0x0008;
pub const MFD_EXEC: ::c_uint = 0x0010;
pub const MFD_HUGE_64KB: ::c_uint = 0x40000000;
pub const MFD_HUGE_512KB: ::c_uint = 0x4c000000;
pub const MFD_HUGE_1MB: ::c_uint = 0x50000000;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2790,6 +2790,8 @@ pub const CMSPAR: ::tcflag_t = 0o10000000000;
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
pub const MFD_HUGETLB: ::c_uint = 0x0004;
pub const MFD_NOEXEC_SEAL: ::c_uint = 0x0008;
pub const MFD_EXEC: ::c_uint = 0x0010;
pub const MFD_HUGE_64KB: ::c_uint = 0x40000000;
pub const MFD_HUGE_512KB: ::c_uint = 0x4c000000;
pub const MFD_HUGE_1MB: ::c_uint = 0x50000000;
Expand Down

0 comments on commit 56e06a7

Please sign in to comment.