From 6c8199c9d9f24ac9000e1bf5723cd4d5339535bd Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 4 Apr 2021 17:48:21 +0300 Subject: [PATCH] os: fix compilation on linux --- vlib/os/os_c.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/os/os_c.v b/vlib/os/os_c.v index 126193f7ba..5f7c827b23 100644 --- a/vlib/os/os_c.v +++ b/vlib/os/os_c.v @@ -554,7 +554,7 @@ pub fn on_segfault(f voidptr) { pub fn executable() string { $if linux { mut xresult := vcalloc(max_path_len) - count := C.readlink('/proc/self/exe', &char(xresult), max_path_len) + count := C.readlink(c'/proc/self/exe', &char(xresult), max_path_len) if count < 0 { eprintln('os.executable() failed at reading /proc/self/exe to get exe path') return executable_fallback() @@ -616,7 +616,7 @@ pub fn executable() string { } $if netbsd { mut result := vcalloc(max_path_len) - count := C.readlink('/proc/curproc/exe', &char(result), max_path_len) + count := C.readlink(c'/proc/curproc/exe', &char(result), max_path_len) if count < 0 { eprintln('os.executable() failed at reading /proc/curproc/exe to get exe path') return executable_fallback() @@ -625,7 +625,7 @@ pub fn executable() string { } $if dragonfly { mut result := vcalloc(max_path_len) - count := C.readlink('/proc/curproc/file', &char(result), max_path_len) + count := C.readlink(c'/proc/curproc/file', &char(result), max_path_len) if count < 0 { eprintln('os.executable() failed at reading /proc/curproc/file to get exe path') return executable_fallback()