diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 3a39b2e9ca20b..fe625744332ee 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -266,6 +266,8 @@ CTLFLAG_RD CTLFLAG_RW CTLFLAG_SECURE CTLFLAG_WR +CTLIOCGCOUNT +CTLIOCGINFO CTLTYPE CTLTYPE_INT CTLTYPE_NODE @@ -1844,6 +1846,7 @@ copyfile copyfile_flags_t cpu_subtype_t cpu_type_t +ctl_info difftime dirfd disconnectx diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 6b391893a3bcd..619afe637c665 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -1026,6 +1026,11 @@ s! { pub validattr: attribute_set_t, pub nativeattr: attribute_set_t, } + + pub struct ctl_info { + pub ctl_id: u32, + pub ctl_name: [::c_char; MAX_KCTL_NAME], + } } s_no_extra_traits! { @@ -3313,6 +3318,9 @@ pub const MINCORE_MODIFIED: ::c_int = 0x4; pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; +pub const CTLIOCGINFO: ::c_uint = 0xC0644E03; +pub const CTLIOCGCOUNT: ::c_uint = 0x40044E02; + // // sys/netinet/in.h // Protocols (RFC 1700) @@ -4489,6 +4497,7 @@ pub const PROC_CSM_NOSMT: ::c_uint = 0x0002; pub const PROC_CSM_TECS: ::c_uint = 0x0004; pub const MAXCOMLEN: usize = 16; pub const MAXTHREADNAMESIZE: usize = 64; +pub const MAX_KCTL_NAME: usize = 96; pub const XUCRED_VERSION: ::c_uint = 0;