Francois L'Archeveque spotted that the variable `winsock2_module'
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 5 Jan 2007 18:43:58 +0000 (18:43 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 5 Jan 2007 18:43:58 +0000 (18:43 +0000)
only exists when compiling for IPv6, so we shouldn't try assigning
to it the rest of the time.

git-svn-id: svn://svn.tartarus.org/sgt/putty@7059 cda61777-01e9-0310-a592-d414129be87e

windows/winnet.c

index 1c574e3..f8838be 100644 (file)
@@ -205,7 +205,10 @@ int sk_startup(int hi, int lo)
 
 void sk_init(void)
 {
-    winsock2_module = winsock_module = LoadLibrary("WS2_32.DLL");
+#ifndef NO_IPV6
+    winsock2_module =
+#endif
+        winsock_module = LoadLibrary("WS2_32.DLL");
     if (!winsock_module) {
        winsock_module = LoadLibrary("WSOCK32.DLL");
     }