Fix missing negative flags in netdb.h, add NI_MAXHOST and NI_MAXSERV
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user