diff options
Diffstat (limited to 'src/libstd/sys/unix/weak.rs')
| -rw-r--r-- | src/libstd/sys/unix/weak.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libstd/sys/unix/weak.rs b/src/libstd/sys/unix/weak.rs index e6f85c08d12..99ab8741159 100644 --- a/src/libstd/sys/unix/weak.rs +++ b/src/libstd/sys/unix/weak.rs @@ -75,11 +75,5 @@ unsafe fn fetch(name: &str) -> usize { Ok(cstr) => cstr, Err(..) => return 0, }; - let lib = libc::dlopen(0 as *const _, libc::RTLD_LAZY); - if lib.is_null() { - return 0 - } - let ret = libc::dlsym(lib, name.as_ptr()) as usize; - libc::dlclose(lib); - return ret + libc::dlsym(libc::RTLD_DEFAULT, name.as_ptr()) as usize } |
