mirror of
https://github.com/vlang/v.git
synced 2025-09-13 09:25:45 -04:00
builtin: fix C prefix for proc_pidpath() (#25239)
This commit is contained in:
parent
9a0166701c
commit
cf61f4fa1b
@ -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
|
||||
fn C.proc_pidpath(int, voidptr, int) int
|
||||
|
||||
fn C.realpath(const_path &char, resolved_path &char) &char
|
||||
|
||||
|
@ -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()
|
||||
|
@ -3,6 +3,8 @@
|
||||
// that can be found in the LICENSE file.
|
||||
module os
|
||||
|
||||
#include <libproc.h>
|
||||
|
||||
pub const sys_write = 4
|
||||
pub const sys_open = 5
|
||||
pub const sys_close = 6
|
||||
|
Loading…
x
Reference in New Issue
Block a user