On Tue, Feb 28, 2012 at 09:34:40PM +0100, Gisle Vanem wrote: > lwIP already has this shim built-in. > Ref. src/include/lwip/sockets.h: > > #if LWIP_COMPAT_SOCKETS > #define accept(a,b,c) lwip_accept(a,b,c) > #define bind(a,b,c) lwip_bind(a,b,c) > #define shutdown(a,b) lwip_shutdown(a,b) > #define closesocket(s) lwip_close(s) > ...
Do the shim include files mirror the POSIX socket include files? If so, then adding something like CPPFLAGS=-Isrc/include/lwip/ to the configure like ought to make configure & curl pick them up. If not, it's trickier. The LWIP-specific include files and function calls in the current source are triggered by the USE_LWIPSOCK macro, but as the original poster mentioned, it's designed for Windows and not an autoconf environment. Assuming you're using gcc, you could try getting past the configure stage using CPPFLAGS="-DUSE_LWIPSOCK=1 -include src/include/lwip/sockets.h" (with the correct path) so configure sees the LWIP shims in that header file when it does the network stack checks. But, that will undoubtedly pull in a ton of stuff into each and every source file that could cause conflicts, so I don't have much hope for this. But the alternative is to put some LWIP magic into configure so it pulls in the LWIP headers at the right time. That's probably going to be the best long-term solution, short of getting a set of POSIX-style header files into LWIP. >>> Dan ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
