diff options
author | Gisle Vanem <gisle.vanem@gmail.com> | 2018-10-22 10:33:44 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-10-26 00:04:02 +0200 |
commit | 639d052e4499c663a578d940713e40cd466268fa (patch) | |
tree | f0211251124110c34e5ab50d810e59cbd19044d5 | |
parent | 25d287d1e5b89c276baa1676afcc8c3297e6e309 (diff) |
rtmp: fix for compiling with lwIP
Compiling on _WIN32 and with USE_LWIPSOCK, causes this error:
curl_rtmp.c(223,3): error: use of undeclared identifier 'setsockopt'
setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO,
^
curl_rtmp.c(41,32): note: expanded from macro 'setsockopt'
#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e)
^
Closes #3155
-rw-r--r-- | lib/curl_rtmp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c index 97430647b..f09f2f332 100644 --- a/lib/curl_rtmp.c +++ b/lib/curl_rtmp.c @@ -37,9 +37,11 @@ /* The last #include file should be: */ #include "memdebug.h" -#ifdef _WIN32 +#if defined(WIN32) && !defined(USE_LWIPSOCK) #define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) #define SET_RCVTIMEO(tv,s) int tv = s*1000 +#elif defined(LWIP_SO_SNDRCVTIMEO_NONSTANDARD) +#define SET_RCVTIMEO(tv,s) int tv = s*1000 #else #define SET_RCVTIMEO(tv,s) struct timeval tv = {s,0} #endif |