]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup: make rwlock_test compile without threads
authorAndreas Gustafsson <source@isc.org>
Wed, 2 May 2001 17:46:07 +0000 (17:46 +0000)
committerAndreas Gustafsson <source@isc.org>
Wed, 2 May 2001 17:46:07 +0000 (17:46 +0000)
bin/tests/rwlock_test.c

index 644d46b800e5b872600d603464ce1f9e847be66c..8864e8cff12fac8712135a558006263452581440 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rwlock_test.c,v 1.18.4.1 2001/01/09 22:33:50 bwelling Exp $ */
+/* $Id: rwlock_test.c,v 1.18.4.2 2001/05/02 17:46:07 gson Exp $ */
 
 #include <config.h>
 
@@ -28,6 +28,8 @@
 #include <isc/string.h>
 #include <isc/util.h>
 
+#ifdef ISC_PLATFORM_USETHREADS
+
 isc_rwlock_t lock;
 
 static void *
@@ -125,3 +127,15 @@ main(int argc, char *argv[]) {
 
        return (0);
 }
+
+#else
+
+int
+main(int argc, char *argv[]) {
+       UNUSED(argc);
+       UNUSED(argv);
+       fprintf(stderr, "This test requires threads.\n");
+       exit(1);
+}
+
+#endif