We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 048894c + 7733b54 commit 8fa9f75Copy full SHA for 8fa9f75
src/dylib.rs
@@ -3,7 +3,7 @@ use std::marker;
3
use std::mem;
4
use std::sync::atomic::{AtomicUsize, Ordering};
5
6
-use libc::{self, c_void};
+use libc::{self, c_char, c_void};
7
8
pub struct Dylib {
9
pub init: AtomicUsize,
@@ -27,7 +27,7 @@ impl Dylib {
27
return true
28
}
29
let name = CString::new(path).unwrap();
30
- let ptr = libc::dlopen(name.as_ptr(), libc::RTLD_LAZY);
+ let ptr = libc::dlopen(name.as_ptr() as *const c_char, libc::RTLD_LAZY);
31
if ptr.is_null() {
32
return false
33
0 commit comments