]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: fix build with `CURL_DISABLE_DOH`
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 9 Dec 2019 10:42:26 +0000 (11:42 +0100)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 13 Dec 2019 19:55:50 +0000 (20:55 +0100)
Closes https://github.com/curl/curl/pull/4692

tests/unit/unit1650.c
tests/unit/unit1655.c

index cd6f519f72865faf9d2ee745326a32da5ee25af2..35ac12c81ed88b26f58f595a2392b152a0c98b4c 100644 (file)
@@ -33,7 +33,7 @@ static void unit_stop(void)
 
 }
 
-#ifdef USE_NGHTTP2
+#ifndef CURL_DISABLE_DOH
 #define DNS_PREAMBLE "\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00"
 #define LABEL_TEST "\x04\x74\x65\x73\x74"
 #define LABEL_HOST "\x04\x68\x6f\x73\x74"
@@ -283,7 +283,7 @@ UNITTEST_START
 }
 UNITTEST_STOP
 
-#else /* USE_NGHTTP2 */
+#else /* CURL_DISABLE_DOH */
 UNITTEST_START
 {
   return 1; /* nothing to do, just fail */
index cccaab8da16fd58d6a3b86ffa42d64b60826431d..a06b23a7609244d6b3371461f001e0ebc81aa265 100644 (file)
@@ -34,6 +34,8 @@ static void unit_stop(void)
     /* done before shutting down and exiting */
 }
 
+#ifndef CURL_DISABLE_DOH
+
 UNITTEST_START
 
 /*
@@ -175,3 +177,13 @@ do {
   fail_unless(olen == olen1, "bad buffer length");
 } while(0);
 UNITTEST_STOP
+
+#else /* CURL_DISABLE_DOH */
+
+UNITTEST_START
+{
+  return 1; /* nothing to do, just fail */
+}
+UNITTEST_STOP
+
+#endif