File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1880,9 +1880,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
18801880
18811881[[package ]]
18821882name = " libc"
1883- version = " 0.2.93 "
1883+ version = " 0.2.98 "
18841884source = " registry+https://github.com/rust-lang/crates.io-index"
1885- checksum = " 9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41 "
1885+ checksum = " 320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790 "
18861886dependencies = [
18871887 " rustc-std-workspace-core" ,
18881888]
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
1616panic_unwind = { path = " ../panic_unwind" , optional = true }
1717panic_abort = { path = " ../panic_abort" }
1818core = { path = " ../core" }
19- libc = { version = " 0.2.93 " , default-features = false , features = [' rustc-dep-of-std' ] }
19+ libc = { version = " 0.2.98 " , default-features = false , features = [' rustc-dep-of-std' ] }
2020compiler_builtins = { version = " 0.1.44" }
2121profiler_builtins = { path = " ../profiler_builtins" , optional = true }
2222unwind = { path = " ../unwind" }
Original file line number Diff line number Diff line change @@ -350,17 +350,14 @@ pub fn current_exe() -> io::Result<PathBuf> {
350350
351351#[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ]
352352pub fn current_exe ( ) -> io:: Result < PathBuf > {
353- extern "C" {
354- fn _NSGetExecutablePath ( buf : * mut libc:: c_char , bufsize : * mut u32 ) -> libc:: c_int ;
355- }
356353 unsafe {
357354 let mut sz: u32 = 0 ;
358- _NSGetExecutablePath ( ptr:: null_mut ( ) , & mut sz) ;
355+ libc :: _NSGetExecutablePath ( ptr:: null_mut ( ) , & mut sz) ;
359356 if sz == 0 {
360357 return Err ( io:: Error :: last_os_error ( ) ) ;
361358 }
362359 let mut v: Vec < u8 > = Vec :: with_capacity ( sz as usize ) ;
363- let err = _NSGetExecutablePath ( v. as_mut_ptr ( ) as * mut i8 , & mut sz) ;
360+ let err = libc :: _NSGetExecutablePath ( v. as_mut_ptr ( ) as * mut i8 , & mut sz) ;
364361 if err != 0 {
365362 return Err ( io:: Error :: last_os_error ( ) ) ;
366363 }
You can’t perform that action at this time.
0 commit comments