]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples/ipv6: disable on win32
authorDaniel Stenberg <daniel@haxx.se>
Mon, 12 Jun 2023 07:46:22 +0000 (09:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 12 Jun 2023 13:28:35 +0000 (15:28 +0200)
I can't make if_nametoindex() work there

Follow-up to c23dc42f3997acf23

Closes #11305

docs/examples/ipv6.c

index 768a73e40495fcc3a790242493a58fb5bb3b5414..c9b4b1fe279855da13e334d4d1325326cbc93501 100644 (file)
  */
 #include <stdio.h>
 #include <curl/curl.h>
-#ifdef WIN32
-#include <netioapi.h>
-#else
-#include <net/if.h>
-#endif
 
-#ifdef __MINGW32__
-/* figure out how this can be used with mingw */
-#define if_nametoindex(x) 0
+#ifndef WIN32
+#include <net/if.h>
 #endif
 
 int main(void)
 {
+#ifndef WIN32
+  /* Windows users need to find how to use if_nametoindex() */
   CURL *curl;
   CURLcode res;
 
@@ -61,5 +57,7 @@ int main(void)
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
+#endif
   return 0;
 }
+