Skip to content

Commit fdb5d77

Browse files
committed
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)
1 parent 3430578 commit fdb5d77

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/libstd/dynamic_lib.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,18 +256,6 @@ mod dl {
256256
dlclose(handle as *mut libc::c_void); ()
257257
}
258258

259-
#[cfg(not(target_os = "openbsd"))]
260-
#[link_name = "dl"]
261-
extern {
262-
fn dlopen(filename: *const libc::c_char,
263-
flag: libc::c_int) -> *mut libc::c_void;
264-
fn dlerror() -> *mut libc::c_char;
265-
fn dlsym(handle: *mut libc::c_void,
266-
symbol: *const libc::c_char) -> *mut libc::c_void;
267-
fn dlclose(handle: *mut libc::c_void) -> libc::c_int;
268-
}
269-
270-
#[cfg(target_os = "openbsd")]
271259
extern {
272260
fn dlopen(filename: *const libc::c_char,
273261
flag: libc::c_int) -> *mut libc::c_void;

0 commit comments

Comments
 (0)