Skip to content

Commit 599fa5c

Browse files
committed
Auto merge of #2637 - asomers:no-kern-stacktop, r=Amanieu
Fix the build on the latest FreeBSD 14 snapshot * KERN_STACKTOP was recently removed upstream, and has never been included in a stable FreeBSD release * The MNTK_ flags are for kernel use only and aren't visible to userland cc `@GuillaumeGomez`
2 parents cf597c2 + 39b5891 commit 599fa5c

File tree

3 files changed

+4
-77
lines changed

3 files changed

+4
-77
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ task:
4444
task:
4545
name: nightly x86_64-unknown-freebsd-14
4646
freebsd_instance:
47-
image: freebsd-14-0-current-amd64-v20211111
47+
image: freebsd-14-0-current-amd64-v20220113
4848
setup_script:
4949
- pkg install -y curl
5050
- curl https://sh.rustup.rs -sSf --output rustup.sh

libc-test/build.rs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,8 +2091,6 @@ fn test_freebsd(target: &str) {
20912091

20922092
"VM_TOTAL" if Some(11) == freebsd_ver => true,
20932093

2094-
// Added in FreeBSD 14.
2095-
"KERN_STACKTOP" if Some(14) > freebsd_ver => true,
20962094
// Added in FreeBSD 13.
20972095
"KERN_PROC_SIGFASTBLK"
20982096
| "USER_LOCALBASE"
@@ -2136,31 +2134,18 @@ fn test_freebsd(target: &str) {
21362134
"PS_FST_TYPE_EVENTFD" if Some(13) > freebsd_ver => true,
21372135

21382136
// Added in FreeBSD 14.
2139-
"MNT_RECURSE"
2140-
| "MNT_DEFERRED"
2141-
| "MNTK_RECURSE"
2142-
| "MNTK_UPPER_WAITER"
2143-
| "MNTK_TASKQUEUE_WAITER"
2144-
if Some(14) > freebsd_ver =>
2145-
{
2146-
true
2147-
}
2137+
"MNT_RECURSE" | "MNT_DEFERRED" if Some(14) > freebsd_ver => true,
21482138

21492139
// Added in FreeBSD 13.
21502140
"MNT_EXTLS" | "MNT_EXTLSCERT" | "MNT_EXTLSCERTUSER" | "MNT_NOCOVER"
2151-
| "MNT_EMPTYDIR" | "MNTK_NOMSYNC" | "MNTK_UNIONFS" | "MNTK_FPLOOKUP"
2152-
| "MNTK_SUSPEND_ALL"
2141+
| "MNT_EMPTYDIR"
21532142
if Some(13) > freebsd_ver =>
21542143
{
21552144
true
21562145
}
21572146

21582147
// Added in FreeBSD 12.
2159-
"MNT_UNTRUSTED" | "MNT_VERIFIED" | "MNTK_TEXT_REFS" | "MNTK_VMSETSIZE_BUG"
2160-
if Some(12) > freebsd_ver =>
2161-
{
2162-
true
2163-
}
2148+
"MNT_UNTRUSTED" | "MNT_VERIFIED" if Some(12) > freebsd_ver => true,
21642149

21652150
// Added in FreeBSD 14.
21662151
"PT_COREDUMP" | "PC_ALL" | "PC_COMPRESS" if Some(14) > freebsd_ver => true,

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,6 @@ pub const KERN_IOV_MAX: ::c_int = 35;
20562056
pub const KERN_HOSTUUID: ::c_int = 36;
20572057
pub const KERN_ARND: ::c_int = 37;
20582058
pub const KERN_MAXPHYS: ::c_int = 38;
2059-
pub const KERN_STACKTOP: ::c_int = 39;
20602059

20612060
pub const KERN_PROC_ALL: ::c_int = 0;
20622061
pub const KERN_PROC_PID: ::c_int = 1;
@@ -3498,63 +3497,6 @@ pub const MNT_RECURSE: u64 = 0x100000000000;
34983497
/// Unmount in async context.
34993498
pub const MNT_DEFERRED: u64 = 0x200000000000;
35003499

3501-
/// Forced unmount in progress.
3502-
pub const MNTK_UNMOUNTF: u32 = 0x00000001;
3503-
/// Filtered async flag.
3504-
pub const MNTK_ASYNC: u32 = 0x00000002;
3505-
/// Async disabled by softdep.
3506-
pub const MNTK_SOFTDEP: u32 = 0x00000004;
3507-
/// Don't do msync.
3508-
pub const MNTK_NOMSYNC: u32 = 0x00000008;
3509-
/// Lock draining is happening.
3510-
pub const MNTK_DRAINING: u32 = 0x00000010;
3511-
/// Refcount expiring is happening.
3512-
pub const MNTK_REFEXPIRE: u32 = 0x00000020;
3513-
/// Allow shared locking for more ops.
3514-
pub const MNTK_EXTENDED_SHARED: u32 = 0x00000040;
3515-
/// Allow shared locking for writes.
3516-
pub const MNTK_SHARED_WRITES: u32 = 0x00000080;
3517-
/// Disallow page faults during reads and writes. Filesystem shall properly handle i/o
3518-
/// state on EFAULT.
3519-
pub const MNTK_NO_IOPF: u32 = 0x00000100;
3520-
/// Pending recursive unmount.
3521-
pub const MNTK_RECURSE: u32 = 0x00000200;
3522-
/// Waiting to drain MNTK_UPPER_PENDING.
3523-
pub const MNTK_UPPER_WAITER: u32 = 0x00000400;
3524-
pub const MNTK_LOOKUP_EXCL_DOTDOT: u32 = 0x00000800;
3525-
pub const MNTK_UNMAPPED_BUFS: u32 = 0x00002000;
3526-
/// FS uses the buffer cache.
3527-
pub const MNTK_USES_BCACHE: u32 = 0x00004000;
3528-
/// Keep use ref for text.
3529-
pub const MNTK_TEXT_REFS: u32 = 0x00008000;
3530-
pub const MNTK_VMSETSIZE_BUG: u32 = 0x00010000;
3531-
/// A hack for F_ISUNIONSTACK.
3532-
pub const MNTK_UNIONFS: u32 = 0x00020000;
3533-
/// fast path lookup is supported.
3534-
pub const MNTK_FPLOOKUP: u32 = 0x00040000;
3535-
/// Suspended by all-fs suspension.
3536-
pub const MNTK_SUSPEND_ALL: u32 = 0x00080000;
3537-
/// Waiting on unmount taskqueue.
3538-
pub const MNTK_TASKQUEUE_WAITER: u32 = 0x00100000;
3539-
/// Disable async.
3540-
pub const MNTK_NOASYNC: u32 = 0x00800000;
3541-
/// Unmount in progress.
3542-
pub const MNTK_UNMOUNT: u32 = 0x01000000;
3543-
/// Waiting for unmount to finish.
3544-
pub const MNTK_MWAIT: u32 = 0x02000000;
3545-
/// Request write suspension.
3546-
pub const MNTK_SUSPEND: u32 = 0x08000000;
3547-
/// Block secondary writes.
3548-
pub const MNTK_SUSPEND2: u32 = 0x04000000;
3549-
/// Write operations are suspended.
3550-
pub const MNTK_SUSPENDED: u32 = 0x10000000;
3551-
/// auto disable cache for nullfs mounts over this fs.
3552-
pub const MNTK_NULL_NOCACHE: u32 = 0x20000000;
3553-
/// FS supports shared lock lookups.
3554-
pub const MNTK_LOOKUP_SHARED: u32 = 0x40000000;
3555-
/// Don't send KNOTEs from VOP hooks.
3556-
pub const MNTK_NOKNOTE: u32 = 0x80000000;
3557-
35583500
/// Get configured filesystems.
35593501
pub const VFS_VFSCONF: ::c_int = 0;
35603502
/// Generic filesystem information.

0 commit comments

Comments
 (0)