From 3465481a8c63b615a3f4fcbd0a11e4a920e0de69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Mon, 21 Dec 2015 13:52:29 +0100 Subject: [PATCH] more proto change on openbsd - sysctl: *mut -> *const - mprotect: *const -> *mut - remove sysctlbyname() that don't exists under openbsd --- src/unix/bsd/openbsdlike/openbsd.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/unix/bsd/openbsdlike/openbsd.rs b/src/unix/bsd/openbsdlike/openbsd.rs index 1c1a9430..a3489ca9 100644 --- a/src/unix/bsd/openbsdlike/openbsd.rs +++ b/src/unix/bsd/openbsdlike/openbsd.rs @@ -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; }