summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc-test/semver/freebsd.txt1
-rw-r--r--libc-test/semver/openbsd.txt1
-rw-r--r--src/unix/bsd/apple/mod.rs74
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs7
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs1
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs2
6 files changed, 86 insertions, 0 deletions
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index ed9aceecbd..ffb424e8b5 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -785,6 +785,7 @@ MSG_NBIO
MSG_NOERROR
MSG_NOSIGNAL
MSG_NOTIFICATION
+MSG_WAITFORONE
NANOSECOND
NETGRAPHDISC
NET_RT_DUMP
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt
index 090311982c..bcd65e09e5 100644
--- a/libc-test/semver/openbsd.txt
+++ b/libc-test/semver/openbsd.txt
@@ -527,6 +527,7 @@ MSG_CMSG_CLOEXEC
MSG_DONTWAIT
MSG_MCAST
MSG_NOSIGNAL
+MSG_WAITFORONE
MNT_LAZY
MNT_NOWAIT
MNT_WAIT
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 3348a7a8af..e380000038 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -435,6 +435,80 @@ s! {
pub ifm_data: if_data,
}
+ pub struct ifa_msghdr {
+ pub ifam_msglen: ::c_ushort,
+ pub ifam_version: ::c_uchar,
+ pub ifam_type: ::c_uchar,
+ pub ifam_addrs: ::c_int,
+ pub ifam_flags: ::c_int,
+ pub ifam_index: ::c_ushort,
+ pub ifam_metric: ::c_int,
+ }
+
+ pub struct ifma_msghdr {
+ pub ifmam_msglen: ::c_ushort,
+ pub ifmam_version: ::c_uchar,
+ pub ifmam_type: ::c_uchar,
+ pub ifmam_addrs: ::c_int,
+ pub ifmam_flags: ::c_int,
+ pub ifmam_index: ::c_ushort,
+ }
+
+ pub struct ifma_msghdr2 {
+ pub ifmam_msglen: ::c_ushort,
+ pub ifmam_version: ::c_uchar,
+ pub ifmam_type: ::c_uchar,
+ pub ifmam_addrs: ::c_int,
+ pub ifmam_flags: ::c_int,
+ pub ifmam_index: ::c_ushort,
+ pub ifmam_refcount: i32,
+ }
+
+ pub struct rt_metrics {
+ pub rmx_locks: u32,
+ pub rmx_mtu: u32,
+ pub rmx_hopcount: u32,
+ pub rmx_expire: i32,
+ pub rmx_recvpipe: u32,
+ pub rmx_sendpipe: u32,
+ pub rmx_ssthresh: u32,
+ pub rmx_rtt: u32,
+ pub rmx_rttvar: u32,
+ pub rmx_pksent: u32,
+ pub rmx_state: u32,
+ pub rmx_filler: [u32; 3],
+ }
+
+ pub struct rt_msghdr {
+ pub rtm_msglen: ::c_ushort,
+ pub rtm_version: ::c_uchar,
+ pub rtm_type: ::c_uchar,
+ pub rtm_index: ::c_ushort,
+ pub rtm_flags: ::c_int,
+ pub rtm_addrs: ::c_int,
+ pub rtm_pid: ::pid_t,
+ pub rtm_seq: ::c_int,
+ pub rtm_errno: ::c_int,
+ pub rtm_use: ::c_int,
+ pub rtm_inits: u32,
+ pub rtm_rmx: rt_metrics,
+ }
+
+ pub struct rt_msghdr2 {
+ pub rtm_msglen: ::c_ushort,
+ pub rtm_version: ::c_uchar,
+ pub rtm_type: ::c_uchar,
+ pub rtm_index: ::c_ushort,
+ pub rtm_flags: ::c_int,
+ pub rtm_addrs: ::c_int,
+ pub rtm_refcnt: i32,
+ pub rtm_parentflags: ::c_int,
+ pub rtm_reserved: ::c_int,
+ pub rtm_use: ::c_int,
+ pub rtm_inits: u32,
+ pub rtm_rmx: rt_metrics,
+ }
+
pub struct termios {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs
index 7bf2534455..01d0b4328d 100644
--- a/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs
@@ -3,3 +3,10 @@ pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1;
pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2;
pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1;
pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000;
+pub const PROC_LA_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN + 2;
+pub const PROC_LA_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 3;
+pub const PROC_LA_CTL_LA48_ON_EXEC: ::c_int = 1;
+pub const PROC_LA_CTL_LA57_ON_EXEC: ::c_int = 2;
+pub const PROC_LA_CTL_DEFAULT_ON_EXEC: ::c_int = 3;
+pub const PROC_LA_STATUS_LA48: ::c_int = 0x01000000;
+pub const PROC_LA_STATUS_LA57: ::c_int = 0x02000000;
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 01a3bf9db8..c453e7c9b1 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -3696,6 +3696,7 @@ pub const MSG_NBIO: ::c_int = 0x00004000;
pub const MSG_COMPAT: ::c_int = 0x00008000;
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
pub const MSG_NOSIGNAL: ::c_int = 0x20000;
+pub const MSG_WAITFORONE: ::c_int = 0x00080000;
// utmpx entry types
pub const EMPTY: ::c_short = 0;
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 8099bad1d1..9e9de2e120 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1073,6 +1073,8 @@ pub const IP_RECVIF: ::c_int = 30;
pub const TCP_MD5SIG: ::c_int = 0x04;
pub const TCP_NOPUSH: ::c_int = 0x10;
+pub const MSG_WAITFORONE: ::c_int = 0x1000;
+
pub const AF_ECMA: ::c_int = 8;
pub const AF_ROUTE: ::c_int = 17;
pub const AF_ENCAP: ::c_int = 28;