cURL / Mailing Lists / curl-library / Single Mail

curl-library

errno on lwIP

From: Gisle Vanem <gvanem_at_yahoo.no>
Date: Wed, 9 Oct 2013 14:00:27 +0200

lib/curl_setup_once.h assumes lwIP on Windows uses 'SetLastError()'
to set network errors. It doesn't; it uses 'errno'. Hence this little
patch:

--- g:/MingW32/src/inet/curl/Git-latest/lib/curl_setup_once.h 2013-02-23 19:58:58 +0000
+++ g:/MingW32/src/inet/curl/lib/curl_setup_once.h 2013-08-23 20:10:25 +0000
@@ -440,7 +440,7 @@
  * (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

--gv

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-10-09