Skip to content

Commit

Permalink
openbsd: remove specific block and cleanup linkage
Browse files Browse the repository at this point in the history
- 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)
  • Loading branch information
semarie committed Feb 1, 2015
1 parent 3430578 commit fdb5d77
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/libstd/dynamic_lib.rs
Expand Up @@ -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;
Expand Down

0 comments on commit fdb5d77

Please sign in to comment.