From bfeaec664fb238ddfabf0d819d98553a26ed5ecf Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Mon, 2 Nov 2020 16:21:48 +0000 Subject: [PATCH] ITS#9354 - Fix usage of signal to be portable --- tests/progs/slapd-watcher.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/progs/slapd-watcher.c b/tests/progs/slapd-watcher.c index 021c522f23..86ba59bc18 100644 --- a/tests/progs/slapd-watcher.c +++ b/tests/progs/slapd-watcher.c @@ -21,6 +21,7 @@ #include +#include "ac/signal.h" #include "ac/stdlib.h" #include "ac/time.h" @@ -597,7 +598,9 @@ main( int argc, char **argv ) } tester_config_finish( config ); - signal(SIGPIPE, SIG_IGN); +#ifdef SIGPIPE + (void) SIGNAL(SIGPIPE, SIG_IGN); +#endif /* don't clear the screen if debug is enabled */ if (debug)