summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-12-17 12:53:32 -0600
committerGitHub <noreply@github.com>2018-12-17 12:53:32 -0600
commit8b63b1cfb016ae70f0deec33b9d7d20395ec2988 (patch)
treeb0b8d9d58f20dc1ec946ba221ce231dac6fa794e
parented8309bc03ba32c9f407d1800ad6d51ade19cdb0 (diff)
parentb8e64540af2cf23f79d492097412569ea323a04e (diff)
downloadrust-libc-8b63b1cfb016ae70f0deec33b9d7d20395ec2988.tar.gz
Merge pull request #1177 from reitermarkus/macos-netdb
Add `AI_*` constants from `netdb.h` for macOS.
-rw-r--r--src/unix/bsd/apple/mod.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index bb07cc4872..c88693bf7e 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -1914,6 +1914,13 @@ pub const IUTF8: ::tcflag_t = 0x00004000;
pub const CRTSCTS: ::tcflag_t = 0x00030000;
pub const NI_MAXHOST: ::socklen_t = 1025;
+pub const NI_MAXSERV: ::socklen_t = 32;
+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_NUMERICSCOPE: ::c_int = 0x00000100;
+pub const NI_DGRAM: ::c_int = 0x00000010;
pub const Q_GETQUOTA: ::c_int = 0x300;
pub const Q_SETQUOTA: ::c_int = 0x400;
@@ -2147,6 +2154,19 @@ pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001;
pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t;
+pub const AI_PASSIVE: ::c_int = 0x00000001;
+pub const AI_CANONNAME: ::c_int = 0x00000002;
+pub const AI_NUMERICHOST: ::c_int = 0x00000004;
+pub const AI_NUMERICSERV: ::c_int = 0x00001000;
+pub const AI_MASK: ::c_int = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST |
+ AI_NUMERICSERV | AI_ADDRCONFIG;
+pub const AI_ALL: ::c_int = 0x00000100;
+pub const AI_V4MAPPED_CFG: ::c_int = 0x00000200;
+pub const AI_ADDRCONFIG: ::c_int = 0x00000400;
+pub const AI_V4MAPPED: ::c_int = 0x00000800;
+pub const AI_DEFAULT: ::c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG;
+pub const AI_UNUSABLE: ::c_int = 0x10000000;
+
pub const SIGEV_NONE: ::c_int = 0;
pub const SIGEV_SIGNAL: ::c_int = 1;
pub const SIGEV_THREAD: ::c_int = 3;