summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorJaremy Creechley <creechley@gmail.com>2020-09-14 00:57:49 -0600
committerGitHub <noreply@github.com>2020-09-14 08:57:49 +0200
commit6c49767a6c656fb097df71c41e4f123380bc1ca9 (patch)
tree851739f6b139423e77ba180032762fac6348bbc1 /lib/pure
parent1df5cfba52ccc71e3c69b6cd7d08cebd70bbb187 (diff)
downloadNim-6c49767a6c656fb097df71c41e4f123380bc1ca9.tar.gz
Fixing issue #15302 -- lwip doesn't support signals (#15303)
* Fixing issue #15302 -- lwip doesn't support signals

* Adding test to catch issue #15302 -- lwip/freertos net library
don't try to build / run on windows, it'll compile only but not run

Fixing issue #15302 -- reworking test to compile on other platforms
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/net.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index 5d2ec8e30..f30b893a7 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -1061,7 +1061,7 @@ proc accept*(server: Socket, client: var owned(Socket),
   var addrDummy = ""
   acceptAddr(server, client, addrDummy, flags)
 
-when defined(posix):
+when defined(posix) and not defined(lwip):
   from posix import Sigset, sigwait, sigismember, sigemptyset, sigaddset,
     sigprocmask, pthread_sigmask, SIGPIPE, SIG_BLOCK, SIG_UNBLOCK
 
@@ -1079,7 +1079,7 @@ template blockSigpipe(body: untyped): untyped =
   ##
   ## For convenience, this template is also available for non-POSIX system,
   ## where `body` will be executed as-is.
-  when not defined(posix):
+  when not defined(posix) or defined(lwip):
     body
   else:
     template sigmask(how: cint, set, oset: var Sigset): untyped {.gensym.} =