more proto change on openbsd

- sysctl: *mut -> *const
- mprotect: *const -> *mut
- remove sysctlbyname() that don't exists under openbsd
This commit is contained in:
Sébastien Marie 2015-12-21 13:52:29 +01:00
parent 040976b20f
commit 3465481a8c
1 changed files with 2 additions and 8 deletions

View File

@ -218,19 +218,13 @@ pub const KERN_PROC_ARGS: ::c_int = 55;
pub const SYS_getentropy: ::c_int = 7;
extern {
pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-> ::c_int;
pub fn sysctl(name: *mut ::c_int,
pub fn sysctl(name: *const ::c_int,
namelen: ::c_uint,
oldp: *mut ::c_void,
oldlenp: *mut ::size_t,
newp: *mut ::c_void,
newlen: ::size_t)
-> ::c_int;
pub fn sysctlbyname(name: *const ::c_char,
oldp: *mut ::c_void,
oldlenp: *mut ::size_t,
newp: *mut ::c_void,
newlen: ::size_t)
-> ::c_int;
}