File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
library/std/src/sys/pal/unix Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,9 @@ impl FileDesc {
284284 super :: weak:: weak!( fn preadv( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
285285
286286 match preadv. get ( ) {
287- Some ( preadv ) => {
287+ Some ( read ) => {
288288 let ret = cvt ( unsafe {
289- preadv (
289+ read (
290290 self . as_raw_fd ( ) ,
291291 bufs. as_mut_ptr ( ) as * mut libc:: iovec as * const libc:: iovec ,
292292 cmp:: min ( bufs. len ( ) , max_iov ( ) ) as libc:: c_int ,
@@ -477,9 +477,9 @@ impl FileDesc {
477477 super :: weak:: weak!( fn pwritev( libc:: c_int, * const libc:: iovec, libc:: c_int, off64_t) -> isize ) ;
478478
479479 match pwritev. get ( ) {
480- Some ( pwritev ) => {
480+ Some ( read ) => {
481481 let ret = cvt ( unsafe {
482- pwritev (
482+ read (
483483 self . as_raw_fd ( ) ,
484484 bufs. as_ptr ( ) as * const libc:: iovec ,
485485 cmp:: min ( bufs. len ( ) , max_iov ( ) ) as libc:: c_int ,
Original file line number Diff line number Diff line change @@ -62,15 +62,16 @@ impl<F: Copy> ExternWeak<F> {
6262}
6363
6464pub ( crate ) macro dlsym {
65- ( fn $name: ident( $( $t: ty) , * ) -> $ret: ty) => (
66- dlsym ! ( fn $name( $( $t) , * ) -> $ret, stringify!( $name) ) ;
65+ ( $v : vis fn $name: ident( $( $t: ty) , * ) -> $ret: ty) => (
66+ dlsym ! ( $v fn $name( $( $t) , * ) -> $ret, stringify!( $name) ) ;
6767 ) ,
68- ( fn $name: ident( $( $t: ty) , * ) -> $ret: ty, $sym: expr) => (
69- static DLSYM : DlsymWeak < unsafe extern "C" fn ( $( $t) , * ) -> $ret> =
68+ ( $v: vis fn $name: ident( $( $t: ty) , * ) -> $ret: ty, $sym: expr) => (
69+ #[ allow ( non_upper_case_globals ) ]
70+ $v static $name: DlsymWeak < unsafe extern "C" fn ( $( $t) , * ) -> $ret> =
7071 DlsymWeak :: new ( concat ! ( $sym, '\0' ) ) ;
71- let $name = & DLSYM ;
7272 )
7373}
74+
7475pub ( crate ) struct DlsymWeak < F > {
7576 name : & ' static str ,
7677 func : AtomicPtr < libc:: c_void > ,
You can’t perform that action at this time.
0 commit comments