From fdb5d77d0921f70d4c7b6b1ace15b5d481a6b732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Fri, 30 Jan 2015 14:28:13 +0100 Subject: [PATCH] openbsd: remove specific block and cleanup linkage - the specific block for dl* function isn't need for openbsd if libdl isn't marked to be linked here. remove them. - remove the linkage for libdl: it should already specified in `rtdeps.rs`. the code of `dynamic_lib.rs` include libdl for: - linux (already defined in rtdeps.rs) - android (already defined in rtdeps.rs) - macos (not needed for macos) - ios (probably the same as macos) - freebsd (libdl is a stub) - dragonfly (libdl is a stub) --- src/libstd/dynamic_lib.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs index 458b0a46e8b2..c4017627e286 100644 --- a/src/libstd/dynamic_lib.rs +++ b/src/libstd/dynamic_lib.rs @@ -256,18 +256,6 @@ mod dl { dlclose(handle as *mut libc::c_void); () } - #[cfg(not(target_os = "openbsd"))] - #[link_name = "dl"] - extern { - fn dlopen(filename: *const libc::c_char, - flag: libc::c_int) -> *mut libc::c_void; - fn dlerror() -> *mut libc::c_char; - fn dlsym(handle: *mut libc::c_void, - symbol: *const libc::c_char) -> *mut libc::c_void; - fn dlclose(handle: *mut libc::c_void) -> libc::c_int; - } - - #[cfg(target_os = "openbsd")] extern { fn dlopen(filename: *const libc::c_char, flag: libc::c_int) -> *mut libc::c_void;