]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_setopt: handle a libcurl build without netrc support
authorDaniel Stenberg <daniel@haxx.se>
Sun, 8 Sep 2019 21:47:56 +0000 (23:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 9 Sep 2019 06:18:58 +0000 (08:18 +0200)
Reported-by: codesniffer13 on github
Fixes #4302
Closes #4305

src/tool_setopt.c

index 871e25c018605d89c702bad450f3fdde0c74d694..4c98d9057fed27402c518892d73eedd9741e93f6 100644 (file)
@@ -824,6 +824,16 @@ bool tool_setopt_skip(CURLoption tag)
     break;
   }
 #endif
+#ifdef CURL_DISABLE_NETRC
+#define USED_TAG
+  switch(tag) {
+  case CURLOPT_NETRC:
+  case CURLOPT_NETRC_FILE:
+    return TRUE;
+  default:
+    break;
+  }
+#endif
 
 #ifndef USED_TAG
   (void)tag;