change proto for getnameinfo()
arguments `hostlen' and `servlen' are `socklen_t' or `size_t' depending the platform - apple: I don't known, so I don't change the original definition (socklen_t) - netbsd: socklen_t - freebsd: size_t - dragonfly: size_t - openbsd: size_t - bitrig: size_t
This commit is contained in:
parent
3465481a8c
commit
5f75552056
@ -810,6 +810,13 @@ pub const IUTF8: ::tcflag_t = 0x00004000;
|
|||||||
pub const CRTSCTS: ::tcflag_t = 0x00030000;
|
pub const CRTSCTS: ::tcflag_t = 0x00030000;
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
|
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||||
|
salen: ::socklen_t,
|
||||||
|
host: *mut ::c_char,
|
||||||
|
hostlen: ::socklen_t,
|
||||||
|
serv: *mut ::c_char,
|
||||||
|
sevlen: ::socklen_t,
|
||||||
|
flags: ::c_int) -> ::c_int;
|
||||||
pub fn mincore(addr: *const ::c_void, len: ::size_t,
|
pub fn mincore(addr: *const ::c_void, len: ::size_t,
|
||||||
vec: *mut ::c_char) -> ::c_int;
|
vec: *mut ::c_char) -> ::c_int;
|
||||||
pub fn sysctlnametomib(name: *const ::c_char,
|
pub fn sysctlnametomib(name: *const ::c_char,
|
||||||
|
@ -558,6 +558,13 @@ pub const ST_NOSUID: ::c_ulong = 2;
|
|||||||
pub const HW_AVAILCPU: ::c_int = 25;
|
pub const HW_AVAILCPU: ::c_int = 25;
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
|
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||||
|
salen: ::socklen_t,
|
||||||
|
host: *mut ::c_char,
|
||||||
|
hostlen: ::size_t,
|
||||||
|
serv: *mut ::c_char,
|
||||||
|
servlen: ::size_t,
|
||||||
|
flags: ::c_int) -> ::c_int;
|
||||||
pub fn mincore(addr: *const ::c_void, len: ::size_t,
|
pub fn mincore(addr: *const ::c_void, len: ::size_t,
|
||||||
vec: *mut ::c_char) -> ::c_int;
|
vec: *mut ::c_char) -> ::c_int;
|
||||||
pub fn sysctlnametomib(name: *const ::c_char,
|
pub fn sysctlnametomib(name: *const ::c_char,
|
||||||
|
@ -322,13 +322,6 @@ extern {
|
|||||||
pub fn setgroups(ngroups: ::c_int,
|
pub fn setgroups(ngroups: ::c_int,
|
||||||
ptr: *const ::gid_t) -> ::c_int;
|
ptr: *const ::gid_t) -> ::c_int;
|
||||||
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
|
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
|
||||||
pub fn getnameinfo(sa: *const ::sockaddr,
|
|
||||||
salen: ::socklen_t,
|
|
||||||
host: *mut ::c_char,
|
|
||||||
hostlen: ::socklen_t,
|
|
||||||
serv: *mut ::c_char,
|
|
||||||
sevlen: ::socklen_t,
|
|
||||||
flags: ::c_int) -> ::c_int;
|
|
||||||
pub fn kqueue() -> ::c_int;
|
pub fn kqueue() -> ::c_int;
|
||||||
pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
|
pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
|
||||||
pub fn syscall(num: ::c_int, ...) -> ::c_int;
|
pub fn syscall(num: ::c_int, ...) -> ::c_int;
|
||||||
|
@ -216,6 +216,13 @@ pub const HW_AVAILCPU: ::c_int = 25;
|
|||||||
pub const KERN_PROC_ARGS: ::c_int = 55;
|
pub const KERN_PROC_ARGS: ::c_int = 55;
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
|
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||||
|
salen: ::socklen_t,
|
||||||
|
host: *mut ::c_char,
|
||||||
|
hostlen: ::size_t,
|
||||||
|
serv: *mut ::c_char,
|
||||||
|
servlen: ::size_t,
|
||||||
|
flags: ::c_int) -> ::c_int;
|
||||||
pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
|
pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
|
||||||
-> ::c_int;
|
-> ::c_int;
|
||||||
pub fn sysctl(name: *mut ::c_int,
|
pub fn sysctl(name: *mut ::c_int,
|
||||||
|
@ -321,6 +321,13 @@ pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
|
|||||||
pub const CRTSCTS: ::tcflag_t = 0x00010000;
|
pub const CRTSCTS: ::tcflag_t = 0x00010000;
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
|
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||||
|
salen: ::socklen_t,
|
||||||
|
host: *mut ::c_char,
|
||||||
|
hostlen: ::socklen_t,
|
||||||
|
serv: *mut ::c_char,
|
||||||
|
sevlen: ::socklen_t,
|
||||||
|
flags: ::c_int) -> ::c_int;
|
||||||
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
|
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
|
||||||
-> ::c_int;
|
-> ::c_int;
|
||||||
pub fn sysctl(name: *const ::c_int,
|
pub fn sysctl(name: *const ::c_int,
|
||||||
|
@ -218,6 +218,13 @@ pub const KERN_PROC_ARGS: ::c_int = 55;
|
|||||||
pub const SYS_getentropy: ::c_int = 7;
|
pub const SYS_getentropy: ::c_int = 7;
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
|
pub fn getnameinfo(sa: *const ::sockaddr,
|
||||||
|
salen: ::socklen_t,
|
||||||
|
host: *mut ::c_char,
|
||||||
|
hostlen: ::size_t,
|
||||||
|
serv: *mut ::c_char,
|
||||||
|
servlen: ::size_t,
|
||||||
|
flags: ::c_int) -> ::c_int;
|
||||||
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
|
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
|
||||||
-> ::c_int;
|
-> ::c_int;
|
||||||
pub fn sysctl(name: *const ::c_int,
|
pub fn sysctl(name: *const ::c_int,
|
||||||
|
Loading…
Reference in New Issue
Block a user