File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,10 @@ mod dl {
99
99
let s = CString :: new ( filename. as_bytes ( ) ) . unwrap ( ) ;
100
100
101
101
let mut dlerror = error:: lock ( ) ;
102
- let ret = unsafe { libc:: dlopen ( s. as_ptr ( ) , libc:: RTLD_LAZY ) } as * mut u8 ;
102
+ let ret = unsafe { libc:: dlopen ( s. as_ptr ( ) , libc:: RTLD_LAZY | libc :: RTLD_LOCAL ) } ;
103
103
104
104
if !ret. is_null ( ) {
105
- return Ok ( ret) ;
105
+ return Ok ( ret. cast ( ) ) ;
106
106
}
107
107
108
108
// A NULL return from `dlopen` indicates that an error has definitely occurred, so if
@@ -122,10 +122,10 @@ mod dl {
122
122
// error message by accident.
123
123
dlerror. clear ( ) ;
124
124
125
- let ret = libc:: dlsym ( handle as * mut libc:: c_void , symbol) as * mut u8 ;
125
+ let ret = libc:: dlsym ( handle as * mut libc:: c_void , symbol) ;
126
126
127
127
if !ret. is_null ( ) {
128
- return Ok ( ret) ;
128
+ return Ok ( ret. cast ( ) ) ;
129
129
}
130
130
131
131
// If `dlsym` returns NULL but there is nothing in `dlerror` it means one of two things:
You can’t perform that action at this time.
0 commit comments