summaryrefslogtreecommitdiffstats
path: root/vendor/libc/src/unix/bsd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
commit5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch)
tree35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /vendor/libc/src/unix/bsd
parentAdding debian version 1.66.0+dfsg1-1. (diff)
downloadrustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz
rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libc/src/unix/bsd')
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs2
-rw-r--r--vendor/libc/src/unix/bsd/apple/mod.rs7
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs13
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs22
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs3
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs3
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs10
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs10
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs52
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs22
-rw-r--r--vendor/libc/src/unix/bsd/freebsdlike/mod.rs1
-rw-r--r--vendor/libc/src/unix/bsd/mod.rs17
-rw-r--r--vendor/libc/src/unix/bsd/netbsdlike/mod.rs8
-rw-r--r--vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs41
-rw-r--r--vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs28
15 files changed, 197 insertions, 42 deletions
diff --git a/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs b/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
index 67f0f7032..79e9ac842 100644
--- a/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
+++ b/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
@@ -6,8 +6,6 @@ s! {
}
}
-pub const CLOCK_UPTIME_RAW: ::clockid_t = 8;
-
cfg_if! {
if #[cfg(libc_align)] {
mod align;
diff --git a/vendor/libc/src/unix/bsd/apple/mod.rs b/vendor/libc/src/unix/bsd/apple/mod.rs
index ed3028695..6b391893a 100644
--- a/vendor/libc/src/unix/bsd/apple/mod.rs
+++ b/vendor/libc/src/unix/bsd/apple/mod.rs
@@ -2694,7 +2694,11 @@ pub const ABMON_11: ::nl_item = 43;
pub const ABMON_12: ::nl_item = 44;
pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4;
+pub const CLOCK_MONOTONIC_RAW_APPROX: ::clockid_t = 5;
pub const CLOCK_MONOTONIC: ::clockid_t = 6;
+pub const CLOCK_UPTIME_RAW: ::clockid_t = 8;
+pub const CLOCK_UPTIME_RAW_APPROX: ::clockid_t = 9;
pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12;
pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16;
@@ -5866,6 +5870,9 @@ extern "C" {
pub fn malloc_size(ptr: *const ::c_void) -> ::size_t;
pub fn malloc_good_size(size: ::size_t) -> ::size_t;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
pub unsafe fn mach_task_self() -> ::mach_port_t {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index 418ac3dc8..70fe6e2ed 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -1409,6 +1409,16 @@ pub const MSG_FBLOCKING: ::c_int = 0x00010000;
pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
pub const MSG_FMASK: ::c_int = 0xFFFF0000;
+// sys/mount.h
+pub const MNT_NODEV: ::c_int = 0x00000010;
+pub const MNT_AUTOMOUNTED: ::c_int = 0x00000020;
+pub const MNT_TRIM: ::c_int = 0x01000000;
+pub const MNT_LOCAL: ::c_int = 0x00001000;
+pub const MNT_QUOTA: ::c_int = 0x00002000;
+pub const MNT_ROOTFS: ::c_int = 0x00004000;
+pub const MNT_USER: ::c_int = 0x00008000;
+pub const MNT_IGNORE: ::c_int = 0x00800000;
+
// utmpx entry types
pub const EMPTY: ::c_short = 0;
pub const RUN_LVL: ::c_short = 1;
@@ -1653,6 +1663,9 @@ extern "C" {
pub fn umtx_sleep(ptr: *const ::c_int, value: ::c_int, timeout: ::c_int) -> ::c_int;
pub fn umtx_wakeup(ptr: *const ::c_int, count: ::c_int) -> ::c_int;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
#[link(name = "rt")]
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
index d29a8d2c7..e8be8815c 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
@@ -6,17 +6,6 @@ pub type time_t = i64;
pub type suseconds_t = i64;
pub type register_t = i64;
-// should be pub(crate), but that requires Rust 1.18.0
-cfg_if! {
- if #[cfg(libc_const_size_of)] {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
- } else {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = 8 - 1;
- }
-}
-
s_no_extra_traits! {
pub struct gpregs {
pub gp_x: [::register_t; 30],
@@ -44,6 +33,17 @@ s_no_extra_traits! {
}
}
+// should be pub(crate), but that requires Rust 1.18.0
+cfg_if! {
+ if #[cfg(libc_const_size_of)] {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
+ } else {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = 8 - 1;
+ }
+}
+
cfg_if! {
if #[cfg(feature = "extra_traits")] {
impl PartialEq for gpregs {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
index aaa043584..563c0f936 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
@@ -463,6 +463,9 @@ extern "C" {
) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
+
+ pub fn dirname(path: *const ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *const ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
index e7f8ad780..df00b6c1d 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
@@ -487,6 +487,9 @@ extern "C" {
pub fn setproctitle_fast(fmt: *const ::c_char, ...);
pub fn timingsafe_bcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
pub fn timingsafe_memcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
index bcd09006b..72a38dc22 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
@@ -527,14 +527,8 @@ extern "C" {
policy: ::c_int,
) -> ::c_int;
- pub fn copy_file_range(
- infd: ::c_int,
- inoffp: *mut ::off_t,
- outfd: ::c_int,
- outoffp: *mut ::off_t,
- len: ::size_t,
- flags: ::c_uint,
- ) -> ::ssize_t;
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
#[link(name = "kvm")]
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
index 9da669604..115b47764 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
@@ -527,14 +527,8 @@ extern "C" {
policy: ::c_int,
) -> ::c_int;
- pub fn copy_file_range(
- infd: ::c_int,
- inoffp: *mut ::off_t,
- outfd: ::c_int,
- outoffp: *mut ::off_t,
- len: ::size_t,
- flags: ::c_uint,
- ) -> ::ssize_t;
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
#[link(name = "kvm")]
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 08fd5a52d..2a4fbbf05 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -998,6 +998,15 @@ s! {
pub alloc_policy: ::c_int,
__pad: [::c_int; 10],
}
+
+ pub struct memory_type {
+ __priva: [::uintptr_t; 32],
+ __privb: [::uintptr_t; 26],
+ }
+
+ pub struct memory_type_list {
+ __priv: [::uintptr_t; 2],
+ }
}
s_no_extra_traits! {
@@ -2280,7 +2289,6 @@ pub const MNT_MULTILABEL: ::c_int = 0x04000000;
pub const MNT_NFS4ACLS: ::c_int = 0x00000010;
pub const MNT_SNAPSHOT: ::c_int = 0x01000000;
pub const MNT_UNION: ::c_int = 0x00000020;
-pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
pub const MNT_NONBUSY: ::c_int = 0x04000000;
pub const SCM_CREDS2: ::c_int = 0x08;
@@ -2380,6 +2388,10 @@ pub const PROC_PROTMAX_CTL: ::c_int = 15;
pub const PROC_PROTMAX_STATUS: ::c_int = 16;
pub const PROC_STACKGAP_CTL: ::c_int = 17;
pub const PROC_STACKGAP_STATUS: ::c_int = 18;
+pub const PROC_NO_NEW_PRIVS_CTL: ::c_int = 19;
+pub const PROC_NO_NEW_PRIVS_STATUS: ::c_int = 20;
+pub const PROC_WXMAP_CTL: ::c_int = 21;
+pub const PROC_WXMAP_STATUS: ::c_int = 22;
pub const PROC_PROCCTL_MD_MIN: ::c_int = 0x10000000;
pub const PPROT_SET: ::c_int = 1;
@@ -2409,6 +2421,13 @@ pub const PROC_STACKGAP_DISABLE: ::c_int = 0x0002;
pub const PROC_STACKGAP_ENABLE_EXEC: ::c_int = 0x0004;
pub const PROC_STACKGAP_DISABLE_EXEC: ::c_int = 0x0008;
+pub const PROC_NO_NEW_PRIVS_ENABLE: ::c_int = 1;
+pub const PROC_NO_NEW_PRIVS_DISABLE: ::c_int = 2;
+
+pub const PROC_WX_MAPPINGS_PERMIT: ::c_int = 0x0001;
+pub const PROC_WX_MAPPINGS_DISALLOW_EXEC: ::c_int = 0x0002;
+pub const PROC_WXORX_ENFORCE: ::c_int = 0x80000000;
+
pub const AF_SLOW: ::c_int = 33;
pub const AF_SCLUSTER: ::c_int = 34;
pub const AF_ARP: ::c_int = 35;
@@ -3935,6 +3954,15 @@ extern "C" {
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int;
+ pub fn copy_file_range(
+ infd: ::c_int,
+ inoffp: *mut ::off_t,
+ outfd: ::c_int,
+ outoffp: *mut ::off_t,
+ len: ::size_t,
+ flags: ::c_uint,
+ ) -> ::ssize_t;
+
pub fn devname_r(
dev: ::dev_t,
mode: ::mode_t,
@@ -4273,8 +4301,13 @@ extern "C" {
pub fn cpuset_setid(which: cpuwhich_t, id: ::id_t, setid: ::cpusetid_t) -> ::c_int;
pub fn cap_enter() -> ::c_int;
pub fn cap_getmode(modep: *mut ::c_uint) -> ::c_int;
+ pub fn cap_fcntls_get(fd: ::c_int, fcntlrightsp: *mut u32) -> ::c_int;
+ pub fn cap_fcntls_limit(fd: ::c_int, fcntlrights: u32) -> ::c_int;
+ pub fn cap_ioctls_get(fd: ::c_int, cmds: *mut u_long, maxcmds: usize) -> isize;
+ pub fn cap_ioctls_limit(fd: ::c_int, cmds: *const u_long, ncmds: usize) -> ::c_int;
pub fn __cap_rights_init(version: ::c_int, rights: *mut cap_rights_t, ...)
-> *mut cap_rights_t;
+ pub fn __cap_rights_get(version: ::c_int, fd: ::c_int, rightsp: *mut cap_rights_t) -> ::c_int;
pub fn __cap_rights_set(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t;
pub fn __cap_rights_clear(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t;
pub fn __cap_rights_is_set(rights: *const cap_rights_t, ...) -> bool;
@@ -4284,6 +4317,7 @@ extern "C" {
pub fn cap_rights_remove(dst: *mut cap_rights_t, src: *const cap_rights_t)
-> *mut cap_rights_t;
pub fn cap_rights_contains(big: *const cap_rights_t, little: *const cap_rights_t) -> bool;
+ pub fn cap_sandboxed() -> bool;
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
@@ -4359,6 +4393,22 @@ extern "C" {
) -> ::c_int;
}
+#[link(name = "memstat")]
+extern "C" {
+ pub fn memstat_strerror(error: ::c_int) -> *const ::c_char;
+ pub fn memstat_mtl_alloc() -> *mut memory_type_list;
+ pub fn memstat_mtl_first(list: *mut memory_type_list) -> *mut memory_type;
+ pub fn memstat_mtl_next(mtp: *mut memory_type) -> *mut memory_type;
+ pub fn memstat_mtl_find(
+ list: *mut memory_type_list,
+ allocator: ::c_int,
+ name: *const ::c_char,
+ ) -> *mut memory_type;
+ pub fn memstat_mtl_free(list: *mut memory_type_list);
+ pub fn memstat_mtl_geterror(list: *mut memory_type_list) -> ::c_int;
+ pub fn memstat_get_name(mtp: *const memory_type) -> *const ::c_char;
+}
+
#[link(name = "kvm")]
extern "C" {
pub fn kvm_dpcpu_setcpu(kd: *mut ::kvm_t, cpu: ::c_uint) -> ::c_int;
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs
index c91a8dfb2..f9fa1c275 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/riscv64.rs
@@ -6,17 +6,6 @@ pub type time_t = i64;
pub type suseconds_t = ::c_long;
pub type register_t = i64;
-// should be pub(crate), but that requires Rust 1.18.0
-cfg_if! {
- if #[cfg(libc_const_size_of)] {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
- } else {
- #[doc(hidden)]
- pub const _ALIGNBYTES: usize = 8 - 1;
- }
-}
-
s_no_extra_traits! {
pub struct gpregs {
pub gp_ra: ::register_t,
@@ -46,6 +35,17 @@ s_no_extra_traits! {
}
}
+// should be pub(crate), but that requires Rust 1.18.0
+cfg_if! {
+ if #[cfg(libc_const_size_of)] {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
+ } else {
+ #[doc(hidden)]
+ pub const _ALIGNBYTES: usize = 8 - 1;
+ }
+}
+
cfg_if! {
if #[cfg(feature = "extra_traits")] {
impl PartialEq for gpregs {
diff --git a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs
index db21597d9..9aefb36e4 100644
--- a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs
+++ b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs
@@ -630,6 +630,7 @@ pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
+pub const MNT_EXPUBLIC: ::c_int = 0x20000000;
pub const MNT_NOATIME: ::c_int = 0x10000000;
pub const MNT_NOCLUSTERR: ::c_int = 0x40000000;
pub const MNT_NOCLUSTERW: ::c_int = 0x80000000;
diff --git a/vendor/libc/src/unix/bsd/mod.rs b/vendor/libc/src/unix/bsd/mod.rs
index 20e203bde..d49e3c440 100644
--- a/vendor/libc/src/unix/bsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/mod.rs
@@ -37,6 +37,7 @@ s! {
#[cfg(not(any(target_os = "macos",
target_os = "ios",
+ target_os = "tvos",
target_os = "watchos",
target_os = "netbsd",
target_os = "openbsd")))]
@@ -114,6 +115,13 @@ s! {
pub rm_so: regoff_t,
pub rm_eo: regoff_t,
}
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -884,10 +892,17 @@ extern "C" {
pub fn srand48(seed: ::c_long);
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
pub fn lcong48(p: *mut ::c_ushort);
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
}
cfg_if! {
- if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos"))] {
+ if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] {
mod apple;
pub use self::apple::*;
} else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] {
diff --git a/vendor/libc/src/unix/bsd/netbsdlike/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/mod.rs
index a7f35ef85..b71531c25 100644
--- a/vendor/libc/src/unix/bsd/netbsdlike/mod.rs
+++ b/vendor/libc/src/unix/bsd/netbsdlike/mod.rs
@@ -419,6 +419,11 @@ pub const MADV_WILLNEED: ::c_int = 3;
pub const MADV_DONTNEED: ::c_int = 4;
pub const MADV_FREE: ::c_int = 6;
+// sys/fstypes.h in NetBSD, or sys/mount.h in OpenBSD
+pub const MNT_NODEV: ::c_int = 0x00000010;
+pub const MNT_LOCAL: ::c_int = 0x00001000;
+pub const MNT_QUOTA: ::c_int = 0x00002000;
+
pub const AF_UNSPEC: ::c_int = 0;
pub const AF_LOCAL: ::c_int = 1;
pub const AF_UNIX: ::c_int = AF_LOCAL;
@@ -738,6 +743,9 @@ extern "C" {
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
pub fn ftok(path: *const ::c_char, id: ::c_int) -> ::key_t;
+
+ pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
+ pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
cfg_if! {
diff --git a/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
index bfe2de083..41f6b23d1 100644
--- a/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1785,6 +1785,23 @@ pub const BIOCSDLT: ::c_ulong = 0x80044278;
pub const BIOCGSEESENT: ::c_ulong = 0x40044276;
pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
+// <sys/fstypes.h>
+pub const MNT_UNION: ::c_int = 0x00000020;
+pub const MNT_NOCOREDUMP: ::c_int = 0x00008000;
+pub const MNT_RELATIME: ::c_int = 0x00020000;
+pub const MNT_IGNORE: ::c_int = 0x00100000;
+pub const MNT_NFS4ACLS: ::c_int = 0x00200000;
+pub const MNT_DISCARD: ::c_int = 0x00800000;
+pub const MNT_EXTATTR: ::c_int = 0x01000000;
+pub const MNT_LOG: ::c_int = 0x02000000;
+pub const MNT_NOATIME: ::c_int = 0x04000000;
+pub const MNT_AUTOMOUNTED: ::c_int = 0x10000000;
+pub const MNT_SYMPERM: ::c_int = 0x20000000;
+pub const MNT_NODEVMTIME: ::c_int = 0x40000000;
+pub const MNT_SOFTDEP: ::c_int = 0x80000000;
+pub const MNT_POSIX1EACLS: ::c_int = 0x00000800;
+pub const MNT_ACLS: ::c_int = MNT_POSIX1EACLS;
+
//<sys/timex.h>
pub const NTP_API: ::c_int = 4;
pub const MAXPHASE: ::c_long = 500000000;
@@ -2298,6 +2315,12 @@ pub const _REG_RFLAGS: ::c_int = 23;
pub const _REG_RSP: ::c_int = 24;
pub const _REG_SS: ::c_int = 25;
+// sys/xattr.h
+pub const XATTR_CREATE: ::c_int = 0x01;
+pub const XATTR_REPLACE: ::c_int = 0x02;
+// sys/extattr.h
+pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0;
+
const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -2436,6 +2459,24 @@ extern "C" {
envp: *const *const ::c_char,
) -> ::c_int;
+ pub fn extattr_list_fd(
+ fd: ::c_int,
+ attrnamespace: ::c_int,
+ data: *mut ::c_void,
+ nbytes: ::size_t,
+ ) -> ::ssize_t;
+ pub fn extattr_list_file(
+ path: *const ::c_char,
+ attrnamespace: ::c_int,
+ data: *mut ::c_void,
+ nbytes: ::size_t,
+ ) -> ::ssize_t;
+ pub fn extattr_list_link(
+ path: *const ::c_char,
+ attrnamespace: ::c_int,
+ data: *mut ::c_void,
+ nbytes: ::size_t,
+ ) -> ::ssize_t;
pub fn extattr_delete_fd(
fd: ::c_int,
attrnamespace: ::c_int,
diff --git a/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 506306e9f..3c966990a 100644
--- a/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1639,10 +1639,38 @@ pub const SF_ARCHIVED: ::c_uint = 0x00010000;
pub const SF_IMMUTABLE: ::c_uint = 0x00020000;
pub const SF_APPEND: ::c_uint = 0x00040000;
+// sys/mount.h
+pub const MNT_NOPERM: ::c_int = 0x00000020;
+pub const MNT_WXALLOWED: ::c_int = 0x00000800;
+pub const MNT_EXRDONLY: ::c_int = 0x00000080;
+pub const MNT_DEFEXPORTED: ::c_int = 0x00000200;
+pub const MNT_EXPORTANON: ::c_int = 0x00000400;
+pub const MNT_ROOTFS: ::c_int = 0x00004000;
+pub const MNT_NOATIME: ::c_int = 0x00008000;
+pub const MNT_DELEXPORT: ::c_int = 0x00020000;
+pub const MNT_STALLED: ::c_int = 0x00100000;
+pub const MNT_SWAPPABLE: ::c_int = 0x00200000;
+pub const MNT_WANTRDWR: ::c_int = 0x02000000;
+pub const MNT_SOFTDEP: ::c_int = 0x04000000;
+pub const MNT_DOOMED: ::c_int = 0x08000000;
+
+// For use with vfs_fsync and getfsstat
pub const MNT_WAIT: ::c_int = 1;
pub const MNT_NOWAIT: ::c_int = 2;
pub const MNT_LAZY: ::c_int = 3;
+pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE;
+pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE;
+pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY;
+pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC;
+pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME;
+pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES;
+
+const _LC_LAST: ::c_int = 7;
+pub const LC_ALL_MASK: ::c_int = (1 << _LC_LAST) - 2;
+
+pub const LC_GLOBAL_LOCALE: ::locale_t = -1isize as ::locale_t;
+
const_fn! {
{const} fn _ALIGN(p: usize) -> usize {
(p + _ALIGNBYTES) & !_ALIGNBYTES