diff options
author | Valdemar Erk <valdemar@erk.io> | 2020-05-20 22:59:16 +0200 |
---|---|---|
committer | Valdemar Erk <valdemar@erk.io> | 2020-05-21 14:38:13 +0200 |
commit | 5fec4c3691a5156d1e9a2420bf795a03f2e03d47 (patch) | |
tree | ebc18065eae324d3f7d58469e26c6ec9c2ee8f30 | |
parent | 174920c79f81968c0e7639406463cd86fccba287 (diff) | |
download | rust-libc-5fec4c3691a5156d1e9a2420bf795a03f2e03d47.tar.gz |
[FreeBSD] Add missing getnameinfo() flag values.
This patchs adds missing flag values for getnameinfo()
on FreeBSD, the following flags have been added from
the FreeBSD tree.
/*
* Flag values for getnameinfo()
*/
#define NI_NOFQDN 0x00000001
#define NI_NUMERICHOST 0x00000002
#define NI_NAMEREQD 0x00000004
#define NI_NUMERICSERV 0x00000008
#define NI_DGRAM 0x00000010
#define NI_NUMERICSCOPE 0x00000020
Signed-off-by: Valdemar Erk <valdemar@erk.io>
-rw-r--r-- | libc-test/build.rs | 2 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index f4a2f156b2..ba3c6557aa 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1740,6 +1740,7 @@ fn test_freebsd(target: &str) { | "IP_RECVORIGDSTADDR" | "IPV6_ORIGDSTADDR" | "IPV6_RECVORIGDSTADDR" + | "NI_NUMERICSCOPE" if Some(11) == freebsd_ver => { true @@ -1765,6 +1766,7 @@ fn test_freebsd(target: &str) { | "PD_CLOEXEC" | "PD_ALLOWED_AT_FORK" | "IP_RSS_LISTEN_BUCKET" + | "NI_NUMERICSCOPE" if Some(10) == freebsd_ver => { true diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index d9dc4f2f74..db36184ea8 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -349,6 +349,13 @@ pub const RLIMIT_UMTXP: ::c_int = 14; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: ::rlim_t = 15; +pub const NI_NOFQDN: ::c_int = 0x00000001; +pub const NI_NUMERICHOST: ::c_int = 0x00000002; +pub const NI_NAMEREQD: ::c_int = 0x00000004; +pub const NI_NUMERICSERV: ::c_int = 0x00000008; +pub const NI_DGRAM: ::c_int = 0x00000010; +pub const NI_NUMERICSCOPE: ::c_int = 0x00000020; + pub const Q_GETQUOTA: ::c_int = 0x700; pub const Q_SETQUOTA: ::c_int = 0x800; |