File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ pub fn errno() -> i32 {
78
78
static errno: c_int ;
79
79
}
80
80
81
- errno as i32
81
+ unsafe { errno as i32 }
82
82
}
83
83
84
84
/// Gets a detailed string description for the given error number.
@@ -193,7 +193,7 @@ impl StdError for JoinPathsError {
193
193
fn description ( & self ) -> & str { "failed to join paths" }
194
194
}
195
195
196
- #[ cfg( target_os = "freebsd" ) ]
196
+ #[ cfg( any ( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
197
197
pub fn current_exe ( ) -> io:: Result < PathBuf > {
198
198
unsafe {
199
199
let mut mib = [ libc:: CTL_KERN as c_int ,
@@ -218,11 +218,6 @@ pub fn current_exe() -> io::Result<PathBuf> {
218
218
}
219
219
}
220
220
221
- #[ cfg( target_os = "dragonfly" ) ]
222
- pub fn current_exe ( ) -> io:: Result < PathBuf > {
223
- :: fs:: read_link ( "/proc/curproc/file" )
224
- }
225
-
226
221
#[ cfg( target_os = "netbsd" ) ]
227
222
pub fn current_exe ( ) -> io:: Result < PathBuf > {
228
223
:: fs:: read_link ( "/proc/curproc/exe" )
You can’t perform that action at this time.
0 commit comments