]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9354 - Fix usage of signal to be portable
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 2 Nov 2020 16:21:48 +0000 (16:21 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 2 Nov 2020 18:15:08 +0000 (18:15 +0000)
tests/progs/slapd-watcher.c

index 021c522f235a0f7b55a1ae2b9acf155fd1a419e8..86ba59bc1890c68b552bcc90a47ad9e5cb36ba2e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 
+#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)