diff options
Diffstat (limited to 'vendor/libc/src/unix/bsd')
-rw-r--r-- | vendor/libc/src/unix/bsd/apple/mod.rs | 73 | ||||
-rw-r--r-- | vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs | 2 | ||||
-rw-r--r-- | vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs | 1 | ||||
-rw-r--r-- | vendor/libc/src/unix/bsd/freebsdlike/mod.rs | 3 | ||||
-rw-r--r-- | vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs | 2 | ||||
-rw-r--r-- | vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs | 8 |
6 files changed, 78 insertions, 11 deletions
diff --git a/vendor/libc/src/unix/bsd/apple/mod.rs b/vendor/libc/src/unix/bsd/apple/mod.rs index 4b6ce9b4c..c6f254ea5 100644 --- a/vendor/libc/src/unix/bsd/apple/mod.rs +++ b/vendor/libc/src/unix/bsd/apple/mod.rs @@ -1381,6 +1381,15 @@ s_no_extra_traits! { pub struct os_unfair_lock_s { _os_unfair_lock_opaque: u32, } + + #[cfg_attr(libc_packedN, repr(packed(1)))] + pub struct sockaddr_vm { + pub svm_len: ::c_uchar, + pub svm_family: ::sa_family_t, + pub svm_reserved1: ::c_ushort, + pub svm_port: ::c_uint, + pub svm_cid: ::c_uint, + } } impl siginfo_t { @@ -2683,6 +2692,52 @@ cfg_if! { self._os_unfair_lock_opaque.hash(state); } } + + impl PartialEq for sockaddr_vm { + fn eq(&self, other: &sockaddr_vm) -> bool { + self.svm_len == other.svm_len + && self.svm_family == other.svm_family + && self.svm_reserved1 == other.svm_reserved1 + && self.svm_port == other.svm_port + && self.svm_cid == other.svm_cid + } + } + + impl Eq for sockaddr_vm {} + + impl ::fmt::Debug for sockaddr_vm { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + let svm_len = self.svm_len; + let svm_family = self.svm_family; + let svm_reserved1 = self.svm_reserved1; + let svm_port = self.svm_port; + let svm_cid = self.svm_cid; + + f.debug_struct("sockaddr_vm") + .field("svm_len",&svm_len) + .field("svm_family",&svm_family) + .field("svm_reserved1",&svm_reserved1) + .field("svm_port",&svm_port) + .field("svm_cid",&svm_cid) + .finish() + } + } + + impl ::hash::Hash for sockaddr_vm { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + let svm_len = self.svm_len; + let svm_family = self.svm_family; + let svm_reserved1 = self.svm_reserved1; + let svm_port = self.svm_port; + let svm_cid = self.svm_cid; + + svm_len.hash(state); + svm_family.hash(state); + svm_reserved1.hash(state); + svm_port.hash(state); + svm_cid.hash(state); + } + } } } @@ -3644,6 +3699,9 @@ pub const AF_SYSTEM: ::c_int = 32; pub const AF_NETBIOS: ::c_int = 33; pub const AF_PPP: ::c_int = 34; pub const pseudo_AF_HDRCMPLT: ::c_int = 35; +pub const AF_IEEE80211: ::c_int = 37; +pub const AF_UTUN: ::c_int = 38; +pub const AF_VSOCK: ::c_int = 40; pub const AF_SYS_CONTROL: ::c_int = 2; pub const SYSPROTO_EVENT: ::c_int = 1; @@ -3685,6 +3743,7 @@ pub const PF_NATM: ::c_int = AF_NATM; pub const PF_SYSTEM: ::c_int = AF_SYSTEM; pub const PF_NETBIOS: ::c_int = AF_NETBIOS; pub const PF_PPP: ::c_int = AF_PPP; +pub const PF_VSOCK: ::c_int = AF_VSOCK; pub const NET_RT_DUMP: ::c_int = 1; pub const NET_RT_FLAGS: ::c_int = 2; @@ -3792,12 +3851,13 @@ pub const MSG_HOLD: ::c_int = 0x800; pub const MSG_SEND: ::c_int = 0x1000; pub const MSG_HAVEMORE: ::c_int = 0x2000; pub const MSG_RCVMORE: ::c_int = 0x4000; -// pub const MSG_COMPAT: ::c_int = 0x8000; +pub const MSG_NEEDSA: ::c_int = 0x10000; +pub const MSG_NOSIGNAL: ::c_int = 0x80000; pub const SCM_TIMESTAMP: ::c_int = 0x02; pub const SCM_CREDS: ::c_int = 0x03; -// https://github.com/aosm/xnu/blob/master/bsd/net/if.h#L140-L156 +// https://github.com/aosm/xnu/blob/HEAD/bsd/net/if.h#L140-L156 pub const IFF_UP: ::c_int = 0x1; // interface is up pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging @@ -4594,7 +4654,7 @@ pub const DLT_ATM_RFC1483: ::c_uint = 11; // LLC/SNAP encapsulated atm pub const DLT_RAW: ::c_uint = 12; // raw IP pub const DLT_LOOP: ::c_uint = 108; -// https://github.com/apple/darwin-xnu/blob/master/bsd/net/bpf.h#L100 +// https://github.com/apple/darwin-xnu/blob/HEAD/bsd/net/bpf.h#L100 // sizeof(i32) pub const BPF_ALIGNMENT: ::c_int = 4; @@ -5002,6 +5062,13 @@ pub const SSTOP: u32 = 4; /// Awaiting collection by parent. pub const SZOMB: u32 = 5; +// sys/vsock.h +pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0; +pub const VMADDR_CID_RESERVED: ::c_uint = 1; +pub const VMADDR_CID_HOST: ::c_uint = 2; +pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF; + cfg_if! { if #[cfg(libc_const_extern_fn)] { const fn __DARWIN_ALIGN32(p: usize) -> usize { diff --git a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 7d01e3e0d..b3a5be449 100644 --- a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -1133,7 +1133,7 @@ pub const PROC_REAP_STATUS: ::c_int = 0x0003; pub const PROC_PDEATHSIG_CTL: ::c_int = 0x0004; pub const PROC_PDEATHSIG_STATUS: ::c_int = 0x0005; -// https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/net/if.h#L101 +// https://github.com/DragonFlyBSD/DragonFlyBSD/blob/HEAD/sys/net/if.h#L101 pub const IFF_UP: ::c_int = 0x1; // interface is up pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging diff --git a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs index 633d1dac3..4138af576 100644 --- a/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -5273,7 +5273,6 @@ extern "C" { pub fn fls(value: ::c_int) -> ::c_int; pub fn flsl(value: ::c_long) -> ::c_int; pub fn flsll(value: ::c_longlong) -> ::c_int; - pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; pub fn malloc_stats_print( write_cb: unsafe extern "C" fn(*mut ::c_void, *const ::c_char), cbopaque: *mut ::c_void, diff --git a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs index f328f0dd7..fe69ca420 100644 --- a/vendor/libc/src/unix/bsd/freebsdlike/mod.rs +++ b/vendor/libc/src/unix/bsd/freebsdlike/mod.rs @@ -1339,7 +1339,7 @@ pub const CMGROUP_MAX: usize = 16; pub const EUI64_LEN: usize = 8; -// https://github.com/freebsd/freebsd/blob/master/sys/net/bpf.h +// https://github.com/freebsd/freebsd/blob/HEAD/sys/net/bpf.h pub const BPF_ALIGNMENT: usize = SIZEOF_LONG; // Values for rtprio struct (prio field) and syscall (function argument) @@ -1571,6 +1571,7 @@ extern "C" { mode: ::mode_t, dev: dev_t, ) -> ::c_int; + pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; diff --git a/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs index de5ec3863..46035df31 100644 --- a/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1441,7 +1441,7 @@ pub const MS_SYNC: ::c_int = 0x4; pub const MS_INVALIDATE: ::c_int = 0x2; // Here because they are not present on OpenBSD -// (https://github.com/openbsd/src/blob/master/sys/sys/resource.h) +// (https://github.com/openbsd/src/blob/HEAD/sys/sys/resource.h) pub const RLIMIT_SBSIZE: ::c_int = 9; pub const RLIMIT_AS: ::c_int = 10; pub const RLIMIT_NTHR: ::c_int = 11; diff --git a/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs b/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs index 3b87dc211..7fe81b3aa 100644 --- a/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -110,7 +110,7 @@ s! { pub struct mfs_args { pub fspec: *mut ::c_char, pub export_info: export_args, - // https://github.com/openbsd/src/blob/master/sys/sys/types.h#L134 + // https://github.com/openbsd/src/blob/HEAD/sys/sys/types.h#L134 pub base: *mut ::c_char, pub size: ::c_ulong, } @@ -190,7 +190,7 @@ s! { pub cr_uid: ::uid_t, pub cr_gid: ::gid_t, pub cr_ngroups: ::c_short, - //https://github.com/openbsd/src/blob/master/sys/sys/syslimits.h#L44 + //https://github.com/openbsd/src/blob/HEAD/sys/sys/syslimits.h#L44 pub cr_groups: [::gid_t; 16], } @@ -1515,7 +1515,7 @@ pub const OLCUC: ::tcflag_t = 0x20; pub const ONOCR: ::tcflag_t = 0x40; pub const ONLRET: ::tcflag_t = 0x80; -//https://github.com/openbsd/src/blob/master/sys/sys/mount.h +//https://github.com/openbsd/src/blob/HEAD/sys/sys/mount.h pub const ISOFSMNT_NORRIP: ::c_int = 0x1; // disable Rock Ridge Ext pub const ISOFSMNT_GENS: ::c_int = 0x2; // enable generation numbers pub const ISOFSMNT_EXTATT: ::c_int = 0x4; // enable extended attr @@ -1579,7 +1579,7 @@ pub const TMPFS_ARGS_VERSION: ::c_int = 1; pub const MAP_STACK: ::c_int = 0x4000; pub const MAP_CONCEAL: ::c_int = 0x8000; -// https://github.com/openbsd/src/blob/master/sys/net/if.h#L187 +// https://github.com/openbsd/src/blob/HEAD/sys/net/if.h#L187 pub const IFF_UP: ::c_int = 0x1; // interface is up pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging |