summary refs log tree commit diff stats
path: root/lib/pure/osproc.nim
diff options
context:
space:
mode:
authorVarriount <Varriount@users.noreply.github.com>2014-07-24 18:03:34 -0400
committerVarriount <Varriount@users.noreply.github.com>2014-07-24 18:03:34 -0400
commit835f7007e055ce801d3465daa1e6c7cd94e8061a (patch)
treee475c725e1e8dbb656813af3138e05b7623f63c7 /lib/pure/osproc.nim
parentdcf1425eb996db5d39a23c0360573f1addd4a850 (diff)
parent26ba9e6d3286adddaff0d3c13e91d973f443bf51 (diff)
downloadNim-835f7007e055ce801d3465daa1e6c7cd94e8061a.tar.gz
Merge pull request #1407 from jfhg/devel
fix build on DragonFly BSD and FreeBSD
Diffstat (limited to 'lib/pure/osproc.nim')
-rw-r--r--lib/pure/osproc.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 04a0c2403..c74fa1ceb 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -763,7 +763,7 @@ elif not defined(useNimRtl):
     discard write(data.pErrorPipe[writeIdx], addr error, sizeof(error))
     exitnow(1)
 
-  when defined(macosx):
+  when defined(macosx) or defined(freebsd):
     var environ {.importc.}: cstringArray
 
   proc startProcessAfterFork(data: ptr TStartProcessData) =
@@ -793,7 +793,7 @@ elif not defined(useNimRtl):
     discard fcntl(data.pErrorPipe[writeIdx], F_SETFD, FD_CLOEXEC)
 
     if data.optionPoUsePath:
-      when defined(macosx):
+      when defined(macosx) or defined(freebsd):
         # MacOSX doesn't have execvpe, so we need workaround.
         # On MacOSX we can arrive here only from fork, so this is safe:
         environ = data.sysEnv