From a100b09d44e54f596aab4af41b350dae7b01f5e6 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Wed, 4 Nov 2015 15:14:53 +0100 Subject: [PATCH] Fix compile on DragonFly and FreeBSD --- src/unix/bsd/freebsdlike/mod.rs | 10 +++++----- src/unix/bsd/mod.rs | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index a6ceee76af2c7..14d9f55a65c49 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -501,22 +501,22 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; extern { - 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; pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; pub fn sysctl(name: *const ::c_int, namelen: ::c_uint, oldp: *mut ::c_void, - oldlenp: *mut size_t, + oldlenp: *mut ::size_t, newp: *const ::c_void, - newlen: size_t) + newlen: ::size_t) -> ::c_int; pub fn sysctlbyname(name: *const ::c_char, oldp: *mut ::c_void, - oldlenp: *mut size_t, + oldlenp: *mut ::size_t, newp: *const ::c_void, - newlen: size_t) + newlen: ::size_t) -> ::c_int; pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 03fe18c2ea4be..831473937df4b 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -148,8 +148,7 @@ cfg_if! { if #[cfg(any(target_os = "macos", target_os = "ios"))] { mod apple; pub use self::apple::*; - } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd", - target_os = "dragonfly"))] { + } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] { mod openbsdlike; pub use self::openbsdlike::*; } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] {