summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-02-18 13:41:02 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-02-18 13:41:02 +0100
commit3e63ce2833119483ab73b8ccba0ba2f71ae564e3 (patch)
tree6017207dc09c647c7f9e9366ef5a26adef0e20e4 /lib
parent8a8c2567385382d94b464ee578fab633c80a9aed (diff)
parentc62b204960eb4f7ff49fc56745290ee10b99b091 (diff)
downloadNim-3e63ce2833119483ab73b8ccba0ba2f71ae564e3.tar.gz
Merge pull request #2156 from def-/usevfork
Always use 0x40 for POSIX_SPAWN_USEVFORK
Diffstat (limited to 'lib')
-rw-r--r--lib/posix/posix.nim10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim
index 52bef6de4..845496756 100644
--- a/lib/posix/posix.nim
+++ b/lib/posix/posix.nim
@@ -1732,12 +1732,10 @@ when hasSpawnH:
   when defined(linux):
     # better be safe than sorry; Linux has this flag, macosx doesn't, don't
     # know about the other OSes
-    when defined(tcc):
-      # TCC doesn't define __USE_GNU, so we can't get the magic number from
-      # spawn.h
-      const POSIX_SPAWN_USEVFORK* = cint(0x40)
-    else:
-      var POSIX_SPAWN_USEVFORK* {.importc, header: "<spawn.h>".}: cint
+
+    # Non-GNU systems like TCC and musl-libc  don't define __USE_GNU, so we
+    # can't get the magic number from spawn.h
+    const POSIX_SPAWN_USEVFORK* = cint(0x40)
   else:
     # macosx lacks this, so we define the constant to be 0 to not affect
     # OR'ing of flags: