summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-12 02:18:37 +0200
committerGitHub <noreply@github.com>2016-08-12 02:18:37 +0200
commitb0d9c11e5395b4cb3c1f1294b6dfbaf3f5c1f678 (patch)
tree73cf8736c99d13e76cafd7e13d12c3f9813f6832 /lib
parentf6671b5bfdf1d24cfe026bfab5be06c309b8ba17 (diff)
parentab69849a0589fd4b55be871d3b9f9c8c81ab005e (diff)
downloadNim-b0d9c11e5395b4cb3c1f1294b6dfbaf3f5c1f678.tar.gz
Merge pull request #4609 from cheatfate/issue4606
Fix issue #4606
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/ioselects/ioselectors_kqueue.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/ioselects/ioselectors_kqueue.nim b/lib/pure/ioselects/ioselectors_kqueue.nim
index 29a201863..3e86f19aa 100644
--- a/lib/pure/ioselects/ioselectors_kqueue.nim
+++ b/lib/pure/ioselects/ioselectors_kqueue.nim
@@ -16,6 +16,10 @@ const
   MAX_KQUEUE_CHANGE_EVENTS = 64
   # Maximum number of events that can be returned.
   MAX_KQUEUE_RESULT_EVENTS = 64
+  # SIG_IGN and SIG_DFL declared in posix.nim as variables, but we need them
+  # to be constants and GC-safe.
+  SIG_DFL = cast[proc(x: cint) {.noconv,gcsafe.}](0)
+  SIG_IGN = cast[proc(x: cint) {.noconv,gcsafe.}](1)
 
 when defined(macosx) or defined(freebsd):
   when defined(macosx):