mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
Fix osproc compilation on NetBSD, use workaround for missing execvpe
This commit is contained in:
@@ -886,7 +886,7 @@ elif not defined(useNimRtl):
|
||||
discard write(data.pErrorPipe[writeIdx], addr error, sizeof(error))
|
||||
exitnow(1)
|
||||
|
||||
when defined(macosx) or defined(freebsd):
|
||||
when defined(macosx) or defined(freebsd) or defined(netbsd):
|
||||
var environ {.importc.}: cstringArray
|
||||
|
||||
proc startProcessAfterFork(data: ptr StartProcessData) =
|
||||
@@ -916,7 +916,7 @@ elif not defined(useNimRtl):
|
||||
discard fcntl(data.pErrorPipe[writeIdx], F_SETFD, FD_CLOEXEC)
|
||||
|
||||
if data.optionPoUsePath:
|
||||
when defined(macosx) or defined(freebsd):
|
||||
when defined(macosx) or defined(freebsd) or defined(netbsd):
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user