From 33fef1063f27544dd41a69bdea8934923a6bc5c3 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 12 May 2016 17:08:03 -0700 Subject: [PATCH] Don't link util on musl, consolidate #[link] --- src/unix/notbsd/linux/mips.rs | 1 + src/unix/notbsd/linux/mod.rs | 1 - src/unix/notbsd/linux/other/mod.rs | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/notbsd/linux/mips.rs b/src/unix/notbsd/linux/mips.rs index ae8725d5036f4..a6611d17fee16 100644 --- a/src/unix/notbsd/linux/mips.rs +++ b/src/unix/notbsd/linux/mips.rs @@ -502,6 +502,7 @@ pub const RTLD_NOLOAD: ::c_int = 0x8; pub const SYS_gettid: ::c_long = 4222; // Valid for O32 +#[link(name = "util")] extern { pub fn sysctl(name: *mut ::c_int, namelen: ::c_int, diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 1c0d5e46b4161..58241b76b7e36 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -478,7 +478,6 @@ extern { static mut program_invocation_short_name: *mut ::c_char; } -#[link(name = "util")] extern { pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index 840c1aa554a5a..63a3e92017fa9 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -469,6 +469,7 @@ cfg_if! { } } +#[link(name = "util")] extern { pub fn sysctl(name: *mut ::c_int, namelen: ::c_int,