From 82ed0156c5e2e467d837beef20b3034991d6be52 Mon Sep 17 00:00:00 2001 From: 0x9ef <43169346+0x9ef@users.noreply.github.com> Date: Sun, 14 Jul 2019 13:36:25 +0300 Subject: [PATCH] Fixed clang build for windows. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed: C:\Users\C182~1\AppData\Local\Temp\ccb5oFDP.o: In function `os__fork': C:/Users/─рэ //.vlang//v2.exe.c:4831: undefined reference to `fork' C:\Users\C182~1\AppData\Local\Temp\ccb5oFDP.o: In function `os__wait': C:/Users/─рэ //.vlang//v2.exe.c:4840: undefined reference to `wait' collect2.exe: error: ld returned 1 exit status --- vlib/os/os.v | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index ef0f8007e6..0300f33dc3 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -653,13 +653,17 @@ pub fn signal(signum int, handler voidptr) { } pub fn fork() int { - pid := C.fork() - return pid + $if !windows { + pid := C.fork() + return pid + } } pub fn wait() int { - pid := C.wait(0) - return pid + $if !windows { + pid := C.wait(0) + return pid + } } pub fn file_last_mod_unix(path string) int {