From 039f21ffd6252b7f55eed07c68e1fea70cc4ec46 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 6 Apr 2012 22:43:00 +0200 Subject: [PATCH] small fixes for BSD --- config/nimrod.cfg | 3 +++ lib/pure/os.nim | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/nimrod.cfg b/config/nimrod.cfg index 205ed17658..63512a9bbe 100755 --- a/config/nimrod.cfg +++ b/config/nimrod.cfg @@ -63,6 +63,9 @@ hint[LineTooLong]=off gcc.options.linker = "-ldl" clang.options.linker = "-ldl" tcc.options.linker = "-ldl" + @else: + # BSD got posix_spawn only recently, so we deactivate it for osproc: + define:useFork @end @end diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 5ea93eb064..65f58e6d39 100755 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1377,7 +1377,7 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1".} = result = getApplAux("/proc/" & $getpid() & "/path/a.out") elif defined(bsd): result = getApplAux("/proc/" & $getpid() & "/file") - elif defined(macosx): + elif defined(macosx) or defined(bsd): var size: int32 getExecPath1(nil, size) result = newString(int(size))