Skip to content

Commit b21b709

Browse files
committed
Auto merge of #476 - glaxx:master, r=alexcrichton
Added AF_UNSPEC and several consts from netdb.h
2 parents 335cff9 + d37d42a commit b21b709

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/unix/notbsd/linux/mod.rs

+25
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,31 @@ pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
518518
pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
519519
pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
520520

521+
pub const AI_PASSIVE: ::c_int = 0x0001;
522+
pub const AI_CANONNAME: ::c_int = 0x0002;
523+
pub const AI_NUMERICHOST: ::c_int = 0x0004;
524+
pub const AI_V4MAPPED: ::c_int = 0x0008;
525+
pub const AI_ALL: ::c_int = 0x0010;
526+
pub const AI_ADDRCONFIG: ::c_int = 0x0020;
527+
528+
pub const AI_NUMERICSERV: ::c_int = 0x0400;
529+
530+
pub const EAI_BADFLAGS: ::c_int = -1;
531+
pub const EAI_NONAME: ::c_int = -2;
532+
pub const EAI_AGAIN: ::c_int = -3;
533+
pub const EAI_FAIL: ::c_int = -4;
534+
pub const EAI_FAMILY: ::c_int = -6;
535+
pub const EAI_SOCKTYPE: ::c_int = -7;
536+
pub const EAI_SERVICE: ::c_int = -8;
537+
pub const EAI_MEMORY: ::c_int = -10;
538+
pub const EAI_OVERFLOW: ::c_int = -12;
539+
540+
pub const NI_NUMERICHOST: ::c_int = 1;
541+
pub const NI_NUMERICSERV: ::c_int = 2;
542+
pub const NI_NOFQDN: ::c_int = 4;
543+
pub const NI_NAMEREQD: ::c_int = 8;
544+
pub const NI_DGRAM: ::c_int = 16;
545+
521546
pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
522547
pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
523548
pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;

src/unix/notbsd/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ pub const IFF_DYNAMIC: ::c_int = 0x8000;
450450
pub const AF_UNIX: ::c_int = 1;
451451
pub const AF_INET: ::c_int = 2;
452452
pub const AF_INET6: ::c_int = 10;
453+
pub const AF_UNSPEC: ::c_int = 0;
453454
pub const AF_NETLINK: ::c_int = 16;
454455
pub const SOCK_RAW: ::c_int = 3;
455456
pub const IPPROTO_TCP: ::c_int = 6;

0 commit comments

Comments
 (0)