curl_setup_once: fix errno access for lwip on Windows
authorGisle Vanem <gvanem@yahoo.no>
Wed, 9 Oct 2013 12:45:42 +0000 (14:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 9 Oct 2013 12:45:42 +0000 (14:45 +0200)
lib/curl_setup_once.h assumed lwIP on Windows uses 'SetLastError()' to
set network errors. It doesn't; it uses 'errno'.

lib/curl_setup_once.h

index 6f3240a..69d6d47 100644 (file)
@@ -440,7 +440,7 @@ typedef int sig_atomic_t;
  * (or equivalent) on this platform to hide platform details to code using it.
  */
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(USE_LWIPSOCK)
 #define ERRNO         ((int)GetLastError())
 #define SET_ERRNO(x)  (SetLastError((DWORD)(x)))
 #else