summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xconfig/nimrod.cfg3
-rwxr-xr-xlib/pure/os.nim2
2 files changed, 4 insertions, 1 deletions
diff --git a/config/nimrod.cfg b/config/nimrod.cfg
index 205ed1765..63512a9bb 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 5ea93eb06..65f58e6d3 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))