summaryrefslogtreecommitdiffstats
path: root/polyp/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/util.c')
-rw-r--r--polyp/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/polyp/util.c b/polyp/util.c
index 70766a06..2878c546 100644
--- a/polyp/util.c
+++ b/polyp/util.c
@@ -114,12 +114,16 @@ void pa_check_for_sigpipe(void) {
struct sigaction sa;
sigset_t set;
+#ifdef HAVE_PTHREAD
if (pthread_sigmask(SIG_SETMASK, NULL, &set) < 0) {
+#endif
if (sigprocmask(SIG_SETMASK, NULL, &set) < 0) {
fprintf(stderr, __FILE__": sigprocmask() failed: %s\n", strerror(errno));
return;
}
+#ifdef HAVE_PTHREAD
}
+#endif
if (sigismember(&set, SIGPIPE))
return;