macos libproc fix 2
parent
203f967677
commit
cba12d0106
|
@ -19,7 +19,7 @@ fn backtrace(a voidptr, b int) int
|
||||||
fn backtrace_symbols_fd(voidptr, int, int)
|
fn backtrace_symbols_fd(voidptr, int, int)
|
||||||
|
|
||||||
// <libproc.h>
|
// <libproc.h>
|
||||||
//fn proc_pidpath(int, voidptr, int) int
|
fn proc_pidpath(int, voidptr, int) int
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -698,8 +698,6 @@ pub fn executable() string {
|
||||||
return string_from_wide2(result, len)
|
return string_from_wide2(result, len)
|
||||||
}
|
}
|
||||||
$if mac {
|
$if mac {
|
||||||
return os.args[0]
|
|
||||||
/*
|
|
||||||
mut result := malloc(MAX_PATH)
|
mut result := malloc(MAX_PATH)
|
||||||
pid := C.getpid()
|
pid := C.getpid()
|
||||||
ret := proc_pidpath (pid, result, MAX_PATH)
|
ret := proc_pidpath (pid, result, MAX_PATH)
|
||||||
|
@ -708,7 +706,6 @@ pub fn executable() string {
|
||||||
return '.'
|
return '.'
|
||||||
}
|
}
|
||||||
return string(result)
|
return string(result)
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
$if freebsd {
|
$if freebsd {
|
||||||
mut result := malloc(MAX_PATH)
|
mut result := malloc(MAX_PATH)
|
||||||
|
|
Loading…
Reference in New Issue