File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,10 @@ mod dl {
9999 let s = CString :: new ( filename. as_bytes ( ) ) . unwrap ( ) ;
100100
101101 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 ) } ;
103103
104104 if !ret. is_null ( ) {
105- return Ok ( ret) ;
105+ return Ok ( ret. cast ( ) ) ;
106106 }
107107
108108 // A NULL return from `dlopen` indicates that an error has definitely occurred, so if
@@ -122,10 +122,10 @@ mod dl {
122122 // error message by accident.
123123 dlerror. clear ( ) ;
124124
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) ;
126126
127127 if !ret. is_null ( ) {
128- return Ok ( ret) ;
128+ return Ok ( ret. cast ( ) ) ;
129129 }
130130
131131 // 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