File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
library/std/src/sys/pal/unix Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,16 @@ impl<F: Copy> ExternWeak<F> {
63
63
}
64
64
65
65
pub ( crate ) macro dlsym {
66
- ( fn $name: ident( $( $t: ty) , * ) -> $ret: ty) => (
67
- dlsym ! ( fn $name( $( $t) , * ) -> $ret, stringify!( $name) ) ;
66
+ ( $v : vis fn $name: ident( $( $t: ty) , * ) -> $ret: ty) => (
67
+ dlsym ! ( $v fn $name( $( $t) , * ) -> $ret, stringify!( $name) ) ;
68
68
) ,
69
- ( fn $name: ident( $( $t: ty) , * ) -> $ret: ty, $sym: expr) => (
70
- static DLSYM : DlsymWeak < unsafe extern "C" fn ( $( $t) , * ) -> $ret> =
69
+ ( $v: vis fn $name: ident( $( $t: ty) , * ) -> $ret: ty, $sym: expr) => (
70
+ #[ allow ( non_upper_case_globals ) ]
71
+ $v static $name: DlsymWeak < unsafe extern "C" fn ( $( $t) , * ) -> $ret> =
71
72
DlsymWeak :: new ( concat ! ( $sym, '\0' ) ) ;
72
- let $name = & DLSYM ;
73
73
)
74
74
}
75
+
75
76
pub ( crate ) struct DlsymWeak < F > {
76
77
name : & ' static str ,
77
78
func : AtomicPtr < libc:: c_void > ,
You can’t perform that action at this time.
0 commit comments