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> {
6363}
6464
6565pub ( 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) ) ;
6868 ) ,
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> =
7172 DlsymWeak :: new ( concat ! ( $sym, '\0' ) ) ;
72- let $name = & DLSYM ;
7373 )
7474}
75+
7576pub ( crate ) struct DlsymWeak < F > {
7677 name : & ' static str ,
7778 func : AtomicPtr < libc:: c_void > ,
You can’t perform that action at this time.
0 commit comments