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
This commit is contained in:
Jaremy Creechley 2020-09-14 00:57:49 -06:00 • committed by GitHub
commit 6c49767a6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 15 deletions

View file

@ -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.} =