]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9235 Disable slapd-mtread when NO_THREADS
authorRyan Tandy <ryan@nardis.ca>
Sat, 4 Jul 2020 00:38:36 +0000 (00:38 +0000)
committerRyan Tandy <ryan@nardis.ca>
Sat, 4 Jul 2020 00:38:36 +0000 (00:38 +0000)
tests/progs/slapd-mtread.c

index 1b99b625c2524c13e69b7ae9ceea3242b3eaa7cf..adfa552c67b19395f737685fd2e04f2f6ab119a8 100644 (file)
@@ -25,6 +25,9 @@
 
 #include "portable.h"
 
+/* Requires libldap with threads */
+#ifndef NO_THREADS
+
 #include <stdio.h>
 #include "ldap_pvt_thread.h"
 
@@ -705,3 +708,17 @@ retry:;
                }
        }
 }
+
+#else /* NO_THREADS */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main( int argc, char **argv )
+{
+       fprintf( stderr, "%s: not available when configured --without-threads\n", argv[0] );
+       exit( EXIT_FAILURE );
+}
+
+#endif /* NO_THREADS */