builtin: fix C prefix for proc_pidpath()

This commit is contained in:
kbkpbot 2025-09-05 08:10:27 +08:00
parent 2b4253caf9
commit 9b07004b9b
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ fn C.isdigit(c int) bool
fn C.popen(c &char, t &char) voidptr
// <libproc.h>
pub fn proc_pidpath(int, voidptr, int) int
pub fn C.proc_pidpath(int, voidptr, int) int
fn C.realpath(const_path &char, resolved_path &char) &char

View file

@ -715,7 +715,7 @@ pub fn executable() string {
}
$if macos {
pid := C.getpid()
ret := proc_pidpath(pid, &result[0], max_path_len)
ret := C.proc_pidpath(pid, &result[0], max_path_len)
if ret <= 0 {
eprintln('os.executable() failed at calling proc_pidpath with pid: ${pid} . proc_pidpath returned ${ret} ')
return executable_fallback()