diff -Nru nim-1.6.6.orig/lib/posix/posix.nim nim-1.6.6/lib/posix/posix.nim --- nim-1.6.6.orig/lib/posix/posix.nim 2022-05-05 02:55:22.000000000 +0000 +++ nim-1.6.6/lib/posix/posix.nim 2022-06-03 20:56:48.982600954 +0000 @@ -778,6 +778,13 @@ proc sigtimedwait*(a1: var Sigset, a2: var SigInfo, a3: var Timespec): cint {.importc, header: "".} +when defined(sunos) or defined(solaris): + # The following compile time flag is needed on Illumos/Solaris to use the POSIX + # `sigwait` implementation. See the documentation here: + # https://docs.oracle.com/cd/E19455-01/806-5257/6je9h033k/index.html + # https://www.illumos.org/man/2/sigwait + {.passc: "-D_POSIX_PTHREAD_SEMANTICS".} + proc sigwait*(a1: var Sigset, a2: var cint): cint {. importc, header: "".} proc sigwaitinfo*(a1: var Sigset, a2: var SigInfo): cint {.