File tree 3 files changed +5
-8
lines changed
3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1880,9 +1880,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
1880
1880
1881
1881
[[package ]]
1882
1882
name = " libc"
1883
- version = " 0.2.93 "
1883
+ version = " 0.2.98 "
1884
1884
source = " registry+https://github.com/rust-lang/crates.io-index"
1885
- checksum = " 9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41 "
1885
+ checksum = " 320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790 "
1886
1886
dependencies = [
1887
1887
" rustc-std-workspace-core" ,
1888
1888
]
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'] }
16
16
panic_unwind = { path = " ../panic_unwind" , optional = true }
17
17
panic_abort = { path = " ../panic_abort" }
18
18
core = { 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' ] }
20
20
compiler_builtins = { version = " 0.1.44" }
21
21
profiler_builtins = { path = " ../profiler_builtins" , optional = true }
22
22
unwind = { path = " ../unwind" }
Original file line number Diff line number Diff line change @@ -350,17 +350,14 @@ pub fn current_exe() -> io::Result<PathBuf> {
350
350
351
351
#[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ]
352
352
pub fn current_exe ( ) -> io:: Result < PathBuf > {
353
- extern "C" {
354
- fn _NSGetExecutablePath ( buf : * mut libc:: c_char , bufsize : * mut u32 ) -> libc:: c_int ;
355
- }
356
353
unsafe {
357
354
let mut sz: u32 = 0 ;
358
- _NSGetExecutablePath ( ptr:: null_mut ( ) , & mut sz) ;
355
+ libc :: _NSGetExecutablePath ( ptr:: null_mut ( ) , & mut sz) ;
359
356
if sz == 0 {
360
357
return Err ( io:: Error :: last_os_error ( ) ) ;
361
358
}
362
359
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) ;
364
361
if err != 0 {
365
362
return Err ( io:: Error :: last_os_error ( ) ) ;
366
363
}
You can’t perform that action at this time.
0 commit comments