kjeremy 2021-02-11 10:07:49 -05:00
parent b0f20a795d
commit 61092bd900
3 changed files with 7 additions and 7 deletions

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies]
object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] }
libloading = "0.6.0"
libloading = "0.7.0"
memmap2 = "0.2.0"
tt = { path = "../tt", version = "0.0.0" }

View file

@ -60,7 +60,7 @@ fn find_registrar_symbol(file: &Path) -> io::Result<Option<String>> {
/// It seems that on Windows that behaviour is default, so we do nothing in that case.
#[cfg(windows)]
fn load_library(file: &Path) -> Result<Library, libloading::Error> {
Library::new(file)
unsafe { Library::new(file) }
}
#[cfg(unix)]
@ -71,7 +71,7 @@ fn load_library(file: &Path) -> Result<Library, libloading::Error> {
const RTLD_NOW: c_int = 0x00002;
const RTLD_DEEPBIND: c_int = 0x00008;
UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into())
unsafe { UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) }
}
struct ProcMacroLibraryLibloading {