Skip to content

Commit

Permalink
Don't link util on musl, consolidate #[link]
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 13, 2016
1 parent 6598e2c commit 437f580
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ pub const LOG_SECURITY: ::c_int = 13 << 3;
pub const LOG_CONSOLE: ::c_int = 14 << 3;
pub const LOG_NFACILITIES: ::c_int = 24;

#[link(name = "util")]
extern {
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
Expand Down
1 change: 0 additions & 1 deletion src/unix/bsd/openbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ pub const RTLD_GLOBAL: ::c_int = 0x100;

pub const LOG_NFACILITIES: ::c_int = 24;

#[link(name = "util")]
extern {
pub fn mincore(addr: *mut ::c_void, len: ::size_t,
vec: *mut ::c_char) -> ::c_int;
Expand Down
9 changes: 7 additions & 2 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,21 @@ cfg_if! {
extern {}
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "android",
target_os = "openbsd",
target_os = "android"))] {
#[link(name = "c")]
#[link(name = "m")]
extern {}
} else if #[cfg(any(target_os = "openbsd",
target_os = "bitrig"))] {
#[link(name = "c")]
#[link(name = "m")]
#[link(name = "util")]
extern {}
} else {
#[link(name = "c")]
#[link(name = "m")]
#[link(name = "rt")]
#[link(name = "util")]
extern {}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 437f580

Please sign in to comment.