Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compile time option for POSIX sigwait on Illumos/Solaris #19296

Merged
merged 2 commits into from
Jan 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/posix/posix.nim
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,13 @@ else:
proc sigtimedwait*(a1: var Sigset, a2: var SigInfo,
a3: var Timespec): cint {.importc, header: "<signal.h>".}

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: "<signal.h>".}
proc sigwaitinfo*(a1: var Sigset, a2: var SigInfo): cint {.
Expand Down