summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc-test/build.rs5
-rw-r--r--libc-test/semver/dragonfly.txt1
-rw-r--r--libc-test/semver/freebsd.txt9
-rw-r--r--libc-test/semver/linux.txt7
-rw-r--r--libc-test/semver/netbsd.txt7
-rw-r--r--libc-test/semver/openbsd.txt4
-rw-r--r--libc-test/semver/redox.txt1
-rw-r--r--src/unix/aix/mod.rs2
-rw-r--r--src/unix/bsd/freebsdlike/dragonfly/mod.rs1
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs15
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs7
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs10
-rw-r--r--src/unix/linux_like/linux/mod.rs8
-rw-r--r--src/unix/redox/mod.rs3
14 files changed, 74 insertions, 6 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 9536668f2f..7c2834a807 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -2283,6 +2283,9 @@ fn test_freebsd(target: &str) {
// FIXME: Removed in https://reviews.freebsd.org/D39127.
"KERN_VNODE" => true,
+ // Added in FreeBSD 14
+ "EV_KEEPUDATA" if Some(14) > freebsd_ver => true,
+
_ => false,
}
});
@@ -3476,6 +3479,7 @@ fn test_linux(target: &str) {
|| name.starts_with("P_")
|| name.starts_with("PF_")
|| name.starts_with("RLIMIT_")
+ || name.starts_with("RTEXT_FILTER_")
|| name.starts_with("SOL_")
|| name.starts_with("STATX_")
|| name.starts_with("SW_")
@@ -3490,6 +3494,7 @@ fn test_linux(target: &str) {
if musl || sparc64 {
// FIXME: Requires >= 5.4.1 kernel headers
if name.starts_with("J1939")
+ || name.starts_with("RTEXT_FILTER_")
|| name.starts_with("SO_J1939")
|| name.starts_with("SCM_J1939")
{
diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt
index 115c2919af..23c66c3298 100644
--- a/libc-test/semver/dragonfly.txt
+++ b/libc-test/semver/dragonfly.txt
@@ -269,6 +269,7 @@ EV_ENABLE
EV_EOF
EV_ERROR
EV_FLAG1
+EV_HUP
EV_NODATA
EV_ONESHOT
EV_RECEIPT
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index 429ae63eb8..eadb4e9c73 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -307,6 +307,9 @@ EV_ENABLE
EV_EOF
EV_ERROR
EV_FLAG1
+EV_FLAG2
+EV_FORCEONESHOT
+EV_KEEPUDATA
EV_ONESHOT
EV_RECEIPT
EV_SYSFLAGS
@@ -791,8 +794,11 @@ NI_NUMERICSERV
NOEXPR
NOKERNINFO
NOSTR
+NOTE_ABSTIME
NOTE_ATTRIB
NOTE_CHILD
+NOTE_CLOSE
+NOTE_CLOSE_WRITE
NOTE_DELETE
NOTE_EXEC
NOTE_EXIT
@@ -803,13 +809,16 @@ NOTE_FFCTRLMASK
NOTE_FFLAGSMASK
NOTE_FFNOP
NOTE_FFOR
+NOTE_FILE_POLL
NOTE_FORK
NOTE_LINK
NOTE_LOWAT
NOTE_MSECONDS
NOTE_NSECONDS
+NOTE_OPEN
NOTE_PCTRLMASK
NOTE_PDATAMASK
+NOTE_READ
NOTE_RENAME
NOTE_REVOKE
NOTE_SECONDS
diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt
index 95f8178e5e..53410113b9 100644
--- a/libc-test/semver/linux.txt
+++ b/libc-test/semver/linux.txt
@@ -2047,6 +2047,13 @@ RTCF_LOG
RTCF_MASQ
RTCF_NAT
RTCF_VALVE
+RTEXT_FILTER_BRVLAN
+RTEXT_FILTER_BRVLAN_COMPRESSED
+RTEXT_FILTER_CFM_CONFIG
+RTEXT_FILTER_CFM_STATUS
+RTEXT_FILTER_MRP
+RTEXT_FILTER_SKIP_STATS
+RTEXT_FILTER_VF
RTF_ADDRCLASSMASK
RTF_ADDRCONF
RTF_ALLONLINK
diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt
index 174396c720..3dc84da635 100644
--- a/libc-test/semver/netbsd.txt
+++ b/libc-test/semver/netbsd.txt
@@ -730,6 +730,12 @@ NOTE_DELETE
NOTE_EXEC
NOTE_EXIT
NOTE_EXTEND
+NOTE_FFAND
+NOTE_FFCOPY
+NOTE_FFCTRLMASK
+NOTE_FFLAGSMASK
+NOTE_FFNOP
+NOTE_FFOR
NOTE_FORK
NOTE_LINK
NOTE_LOWAT
@@ -741,6 +747,7 @@ NOTE_RENAME
NOTE_REVOKE
NOTE_TRACK
NOTE_TRACKERR
+NOTE_TRIGGER
NOTE_USECONDS
NOTE_WRITE
NTP_API
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt
index bf0a838280..d95190ee8c 100644
--- a/libc-test/semver/openbsd.txt
+++ b/libc-test/semver/openbsd.txt
@@ -176,6 +176,8 @@ ESOCKTNOSUPPORT
ETOOMANYREFS
EUSERS
EVFILT_AIO
+EVFILT_DEVICE
+EVFILT_EXCEPT
EVFILT_PROC
EVFILT_READ
EVFILT_SIGNAL
@@ -582,6 +584,7 @@ NOEXPR
NOKERNINFO
NOSTR
NOTE_ATTRIB
+NOTE_CHANGE
NOTE_CHILD
NOTE_DELETE
NOTE_EOF
@@ -591,6 +594,7 @@ NOTE_EXTEND
NOTE_FORK
NOTE_LINK
NOTE_LOWAT
+NOTE_OOB
NOTE_PCTRLMASK
NOTE_PDATAMASK
NOTE_RENAME
diff --git a/libc-test/semver/redox.txt b/libc-test/semver/redox.txt
index 7751939311..c8f5d400c5 100644
--- a/libc-test/semver/redox.txt
+++ b/libc-test/semver/redox.txt
@@ -204,6 +204,7 @@ open_wmemstream
pipe2
pthread_condattr_setclock
qsort
+reallocarray
setrlimit
setservent
strcasecmp
diff --git a/src/unix/aix/mod.rs b/src/unix/aix/mod.rs
index 3348ead5b6..98a09b5abc 100644
--- a/src/unix/aix/mod.rs
+++ b/src/unix/aix/mod.rs
@@ -2054,7 +2054,7 @@ f! {
::mem::size_of::<::cmsghdr>() as ::c_uint + length
}
- pub fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
+ pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
::mem::size_of::<::cmsghdr>() as ::c_uint + length
}
diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index 70fe6e2edd..63c0594f41 100644
--- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -1091,6 +1091,7 @@ pub const EV_NODATA: u16 = 0x1000;
pub const EV_FLAG1: u16 = 0x2000;
pub const EV_ERROR: u16 = 0x4000;
pub const EV_EOF: u16 = 0x8000;
+pub const EV_HUP: u16 = 0x8000;
pub const EV_SYSFLAGS: u16 = 0xf000;
pub const FIODNAME: ::c_ulong = 0x80106678;
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index b70a40f15d..55b520faab 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -2693,15 +2693,20 @@ pub const EV_ADD: u16 = 0x1;
pub const EV_DELETE: u16 = 0x2;
pub const EV_ENABLE: u16 = 0x4;
pub const EV_DISABLE: u16 = 0x8;
+pub const EV_FORCEONESHOT: u16 = 0x100;
+pub const EV_KEEPUDATA: u16 = 0x200;
+
pub const EV_ONESHOT: u16 = 0x10;
pub const EV_CLEAR: u16 = 0x20;
pub const EV_RECEIPT: u16 = 0x40;
pub const EV_DISPATCH: u16 = 0x80;
+pub const EV_SYSFLAGS: u16 = 0xf000;
pub const EV_DROP: u16 = 0x1000;
pub const EV_FLAG1: u16 = 0x2000;
-pub const EV_ERROR: u16 = 0x4000;
+pub const EV_FLAG2: u16 = 0x4000;
+
pub const EV_EOF: u16 = 0x8000;
-pub const EV_SYSFLAGS: u16 = 0xf000;
+pub const EV_ERROR: u16 = 0x4000;
pub const NOTE_TRIGGER: u32 = 0x01000000;
pub const NOTE_FFNOP: u32 = 0x00000000;
@@ -2711,6 +2716,7 @@ pub const NOTE_FFCOPY: u32 = 0xc0000000;
pub const NOTE_FFCTRLMASK: u32 = 0xc0000000;
pub const NOTE_FFLAGSMASK: u32 = 0x00ffffff;
pub const NOTE_LOWAT: u32 = 0x00000001;
+pub const NOTE_FILE_POLL: u32 = 0x00000002;
pub const NOTE_DELETE: u32 = 0x00000001;
pub const NOTE_WRITE: u32 = 0x00000002;
pub const NOTE_EXTEND: u32 = 0x00000004;
@@ -2718,6 +2724,10 @@ pub const NOTE_ATTRIB: u32 = 0x00000008;
pub const NOTE_LINK: u32 = 0x00000010;
pub const NOTE_RENAME: u32 = 0x00000020;
pub const NOTE_REVOKE: u32 = 0x00000040;
+pub const NOTE_OPEN: u32 = 0x00000080;
+pub const NOTE_CLOSE: u32 = 0x00000100;
+pub const NOTE_CLOSE_WRITE: u32 = 0x00000200;
+pub const NOTE_READ: u32 = 0x00000400;
pub const NOTE_EXIT: u32 = 0x80000000;
pub const NOTE_FORK: u32 = 0x40000000;
pub const NOTE_EXEC: u32 = 0x20000000;
@@ -2730,6 +2740,7 @@ pub const NOTE_SECONDS: u32 = 0x00000001;
pub const NOTE_MSECONDS: u32 = 0x00000002;
pub const NOTE_USECONDS: u32 = 0x00000004;
pub const NOTE_NSECONDS: u32 = 0x00000008;
+pub const NOTE_ABSTIME: u32 = 0x00000010;
pub const MADV_PROTECT: ::c_int = 10;
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 87132e2587..fd7175583e 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1986,6 +1986,13 @@ pub const EV_ERROR: u32 = 0x4000;
pub const EV_EOF: u32 = 0x8000;
pub const EV_SYSFLAGS: u32 = 0xf000;
+pub const NOTE_TRIGGER: u32 = 0x01000000;
+pub const NOTE_FFNOP: u32 = 0x00000000;
+pub const NOTE_FFAND: u32 = 0x40000000;
+pub const NOTE_FFOR: u32 = 0x80000000;
+pub const NOTE_FFCOPY: u32 = 0xc0000000;
+pub const NOTE_FFCTRLMASK: u32 = 0xc0000000;
+pub const NOTE_FFLAGSMASK: u32 = 0x00ffffff;
pub const NOTE_LOWAT: u32 = 0x00000001;
pub const NOTE_DELETE: u32 = 0x00000001;
pub const NOTE_WRITE: u32 = 0x00000002;
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 192413a54a..7f8f9400df 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -1279,13 +1279,15 @@ pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
pub const PTHREAD_MUTEX_STRICT_NP: ::c_int = 4;
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_STRICT_NP;
+pub const EVFILT_READ: i16 = -1;
+pub const EVFILT_WRITE: i16 = -2;
pub const EVFILT_AIO: i16 = -3;
+pub const EVFILT_VNODE: i16 = -4;
pub const EVFILT_PROC: i16 = -5;
-pub const EVFILT_READ: i16 = -1;
pub const EVFILT_SIGNAL: i16 = -6;
pub const EVFILT_TIMER: i16 = -7;
-pub const EVFILT_VNODE: i16 = -4;
-pub const EVFILT_WRITE: i16 = -2;
+pub const EVFILT_DEVICE: i16 = -8;
+pub const EVFILT_EXCEPT: i16 = -9;
pub const EV_ADD: u16 = 0x1;
pub const EV_DELETE: u16 = 0x2;
@@ -1304,6 +1306,7 @@ pub const EV_SYSFLAGS: u16 = 0xf800;
pub const NOTE_LOWAT: u32 = 0x00000001;
pub const NOTE_EOF: u32 = 0x00000002;
+pub const NOTE_OOB: u32 = 0x00000004;
pub const NOTE_DELETE: u32 = 0x00000001;
pub const NOTE_WRITE: u32 = 0x00000002;
pub const NOTE_EXTEND: u32 = 0x00000004;
@@ -1320,6 +1323,7 @@ pub const NOTE_PCTRLMASK: u32 = 0xf0000000;
pub const NOTE_TRACK: u32 = 0x00000001;
pub const NOTE_TRACKERR: u32 = 0x00000002;
pub const NOTE_CHILD: u32 = 0x00000004;
+pub const NOTE_CHANGE: u32 = 0x00000001;
pub const TMP_MAX: ::c_uint = 0x7fffffff;
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs
index 36b2d7878e..a1e1900747 100644
--- a/src/unix/linux_like/linux/mod.rs
+++ b/src/unix/linux_like/linux/mod.rs
@@ -3042,6 +3042,14 @@ pub const ARPD_LOOKUP: ::c_ushort = 0x02;
pub const ARPD_FLUSH: ::c_ushort = 0x03;
pub const ATF_MAGIC: ::c_int = 0x80;
+pub const RTEXT_FILTER_VF: ::c_int = 1 << 0;
+pub const RTEXT_FILTER_BRVLAN: ::c_int = 1 << 1;
+pub const RTEXT_FILTER_BRVLAN_COMPRESSED: ::c_int = 1 << 2;
+pub const RTEXT_FILTER_SKIP_STATS: ::c_int = 1 << 3;
+pub const RTEXT_FILTER_MRP: ::c_int = 1 << 4;
+pub const RTEXT_FILTER_CFM_CONFIG: ::c_int = 1 << 5;
+pub const RTEXT_FILTER_CFM_STATUS: ::c_int = 1 << 6;
+
// userspace compat definitions for RTNLGRP_*
pub const RTMGRP_LINK: ::c_int = 0x00001;
pub const RTMGRP_NOTIFY: ::c_int = 0x00002;
diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs
index f1bc9cc543..6661ea7358 100644
--- a/src/unix/redox/mod.rs
+++ b/src/unix/redox/mod.rs
@@ -1043,6 +1043,9 @@ extern "C" {
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+ // stdlib.h
+ pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
+
// string.h
pub fn strlcat(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;
pub fn strlcpy(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;