From ef35eba3b274c13502210f3003c9670d772d75eb Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 8 Dec 2024 11:05:50 -0700 Subject: [PATCH] Remove FreeBSD's CAP_UNUSED* and CAP_ALL* constants They aren't stable across OS versions and don't have any legitimate use in applications. See https://github.com/rust-lang/libc/pull/4183 for the corresponding change to the libc-0.2 branch. --- libc-test/semver/freebsd.txt | 6 ------ src/unix/bsd/freebsdlike/freebsd/mod.rs | 6 ------ 2 files changed, 12 deletions(-) diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 34b3e2e62d64f..2c6af27ada5d9 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -149,8 +149,6 @@ CAP_ACL_CHECK CAP_ACL_DELETE CAP_ACL_GET CAP_ACL_SET -CAP_ALL0 -CAP_ALL1 CAP_BIND CAP_BINDAT CAP_CHFLAGSAT @@ -233,10 +231,6 @@ CAP_SOCK_SERVER CAP_SYMLINKAT CAP_TTYHOOK CAP_UNLINKAT -CAP_UNUSED0_44 -CAP_UNUSED0_57 -CAP_UNUSED1_22 -CAP_UNUSED1_57 CAP_WRITE CCAR_OFLOW CCTS_OFLOW diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 9015f6743c63e..bf41f9acd3f89 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -2656,9 +2656,6 @@ pub const CAP_SOCK_SERVER: u64 = CAP_ACCEPT | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN; -pub const CAP_ALL0: u64 = cap_right!(0, 0x000007FFFFFFFFFFu64); -pub const CAP_UNUSED0_44: u64 = cap_right!(0, 0x0000080000000000u64); -pub const CAP_UNUSED0_57: u64 = cap_right!(0, 0x0100000000000000u64); pub const CAP_MAC_GET: u64 = cap_right!(1, 0x0000000000000001u64); pub const CAP_MAC_SET: u64 = cap_right!(1, 0x0000000000000002u64); pub const CAP_SEM_GETVALUE: u64 = cap_right!(1, 0x0000000000000004u64); @@ -2681,9 +2678,6 @@ pub const CAP_ACL_GET: u64 = cap_right!(1, 0x0000000000040000u64); pub const CAP_ACL_SET: u64 = cap_right!(1, 0x0000000000080000u64); pub const CAP_KQUEUE_CHANGE: u64 = cap_right!(1, 0x0000000000100000u64); pub const CAP_KQUEUE: u64 = CAP_KQUEUE_EVENT | CAP_KQUEUE_CHANGE; -pub const CAP_ALL1: u64 = cap_right!(1, 0x00000000001FFFFFu64); -pub const CAP_UNUSED1_22: u64 = cap_right!(1, 0x0000000000200000u64); -pub const CAP_UNUSED1_57: u64 = cap_right!(1, 0x0100000000000000u64); pub const CAP_FCNTL_GETFL: u32 = 1 << 3; pub const CAP_FCNTL_SETFL: u32 = 1 << 4; pub const CAP_FCNTL_GETOWN: u32 = 1 << 5;