From 26ba9e6d3286adddaff0d3c13e91d973f443bf51 Mon Sep 17 00:00:00 2001 From: jfhg Date: Wed, 23 Jul 2014 22:47:16 +0200 Subject: [PATCH] fix build on DragonFly BSD and FreeBSD --- lib/pure/osproc.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 04a0c2403a..c74fa1ceb6 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