define NI_MAXHOST per system
- under openbsd/bitrig it is 256 - change type to `size_t` where system have `getnameinfo()` with `hostlen` as `size_t`
This commit is contained in:
parent
3de62ef5a7
commit
ee8c050071
@ -809,6 +809,8 @@ pub const VT1: ::c_int = 0x00010000;
|
||||
pub const IUTF8: ::tcflag_t = 0x00004000;
|
||||
pub const CRTSCTS: ::tcflag_t = 0x00030000;
|
||||
|
||||
pub const NI_MAXHOST: ::socklen_t = 1025;
|
||||
|
||||
extern {
|
||||
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||
salen: ::socklen_t,
|
||||
|
@ -557,6 +557,8 @@ pub const ST_NOSUID: ::c_ulong = 2;
|
||||
|
||||
pub const HW_AVAILCPU: ::c_int = 25;
|
||||
|
||||
pub const NI_MAXHOST: ::size_t = 1025;
|
||||
|
||||
extern {
|
||||
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||
salen: ::socklen_t,
|
||||
|
@ -147,8 +147,6 @@ pub const IPV6_V6ONLY: ::c_int = 27;
|
||||
|
||||
pub const ST_RDONLY: ::c_ulong = 1;
|
||||
|
||||
pub const NI_MAXHOST: ::socklen_t = 1025;
|
||||
|
||||
pub const CTL_HW: ::c_int = 6;
|
||||
pub const HW_NCPU: ::c_int = 3;
|
||||
|
||||
|
@ -217,6 +217,8 @@ pub const KERN_PROC_ARGS: ::c_int = 55;
|
||||
|
||||
pub const TMP_MAX : ::c_uint = 0x7fffffff;
|
||||
|
||||
pub const NI_MAXHOST: ::size_t = 256;
|
||||
|
||||
extern {
|
||||
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||
salen: ::socklen_t,
|
||||
|
@ -322,6 +322,8 @@ pub const CRTSCTS: ::tcflag_t = 0x00010000;
|
||||
|
||||
pub const TMP_MAX : ::c_uint = 308915776;
|
||||
|
||||
pub const NI_MAXHOST: ::socklen_t = 1025;
|
||||
|
||||
extern {
|
||||
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||
salen: ::socklen_t,
|
||||
|
@ -216,6 +216,8 @@ pub const KERN_PROC_ARGS: ::c_int = 55;
|
||||
|
||||
pub const TMP_MAX : ::c_uint = 0x7fffffff;
|
||||
|
||||
pub const NI_MAXHOST: ::size_t = 256;
|
||||
|
||||
// syscall numbers
|
||||
pub const SYS_getentropy: ::c_int = 7;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user