Fix missing negative flags in netdb.h, add NI_MAXHOST and NI_MAXSERV

This commit is contained in:
Jeremy Soller
2019-01-13 10:34:17 -07:00
parent 018ff409f1
commit 6c0c6dd71b
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -1,6 +1,19 @@
#ifndef _BITS_NETDB_H
#define _BITS_NETDB_H
#define EAI_BADFLAGS (-1)
#define EAI_NONAME (-2)
#define EAI_AGAIN (-3)
#define EAI_FAIL (-4)
#define EAI_NODATA (-5)
#define EAI_FAMILY (-6)
#define EAI_SOCKTYPE (-7)
#define EAI_SERVICE (-8)
#define EAI_ADDRFAMILY (-9)
#define EAI_MEMORY (-10)
#define EAI_SYSTEM (-11)
#define EAI_OVERFLOW (-12)
# define h_addr h_addr_list[0] /* Address, for backward compatibility.*/
#endif /* _BITS_NETDB_H */
+3
View File
@@ -117,6 +117,9 @@ pub const EAI_MEMORY: c_int = -10;
pub const EAI_SYSTEM: c_int = -11;
pub const EAI_OVERFLOW: c_int = -12;
pub const NI_MAXHOST: c_int = 1025;
pub const NI_MAXSERV: c_int = 32;
pub const NI_NUMERICHOST: c_int = 0x0001;
pub const NI_NUMERICSERV: c_int = 0x0002;
pub const NI_NOFQDN: c_int = 0x0004;