Commit 4e3dd55e authored by Gildas Bazin's avatar Gildas Bazin

* src/misc/net.c,getaddrinfo.c: WinCE build fixes.

parent 0e3121b1
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
#include <errno.h> #include <errno.h>
#if defined( WIN32 ) || defined( UNDER_CE ) #if defined( WIN32 ) || defined( UNDER_CE )
# if defined(UNDER_CE) && defined(sockaddr_storage)
# undef sockaddr_storage
# endif
# include <winsock2.h> # include <winsock2.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
#else #else
......
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
#endif #endif
#if defined( WIN32 ) || defined( UNDER_CE ) #if defined( WIN32 ) || defined( UNDER_CE )
# if defined(UNDER_CE) && defined(sockaddr_storage)
# undef sockaddr_storage
# endif
# include <winsock2.h> # include <winsock2.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
#else #else
...@@ -659,8 +662,8 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs, ...@@ -659,8 +662,8 @@ int __net_Read( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
"Increase the mtu size (--mtu option)" ); "Increase the mtu size (--mtu option)" );
i_total += i_data; i_total += i_data;
} }
else else if( WSAGetLastError() == WSAEINTR ) continue;
msg_Err( p_this, "recv failed (%i)", WSAGetLastError() ); else msg_Err( p_this, "recv failed (%i)", WSAGetLastError() );
#else #else
/* EAGAIN only happens with p_vs (SSL) and it's not an error */ /* EAGAIN only happens with p_vs (SSL) and it's not an error */
if( errno != EAGAIN ) if( errno != EAGAIN )
...@@ -745,8 +748,7 @@ int __net_ReadNonBlock( vlc_object_t *p_this, int fd, v_socket_t *p_vs, ...@@ -745,8 +748,7 @@ int __net_ReadNonBlock( vlc_object_t *p_this, int fd, v_socket_t *p_vs,
msg_Err( p_this, "recv() failed. " msg_Err( p_this, "recv() failed. "
"Increase the mtu size (--mtu option)" ); "Increase the mtu size (--mtu option)" );
} }
else else msg_Err( p_this, "recv failed (%i)", WSAGetLastError() );
msg_Err( p_this, "recv failed (%i)", WSAGetLastError() );
#else #else
msg_Err( p_this, "recv failed (%s)", strerror(errno) ); msg_Err( p_this, "recv failed (%s)", strerror(errno) );
#endif #endif
...@@ -826,9 +828,8 @@ int __net_Select( vlc_object_t *p_this, int *pi_fd, v_socket_t **pp_vs, ...@@ -826,9 +828,8 @@ int __net_Select( vlc_object_t *p_this, int *pi_fd, v_socket_t **pp_vs,
msg_Err( p_this, "recv() failed. " msg_Err( p_this, "recv() failed. "
"Increase the mtu size (--mtu option)" ); "Increase the mtu size (--mtu option)" );
} }
else else msg_Err( p_this, "recv failed (%i)",
msg_Err( p_this, "recv failed (%i)", WSAGetLastError() );
WSAGetLastError() );
#else #else
msg_Err( p_this, "recv failed (%s)", strerror(errno) ); msg_Err( p_this, "recv failed (%s)", strerror(errno) );
#endif #endif
...@@ -1170,5 +1171,3 @@ static int SocksHandshakeTCP( vlc_object_t *p_obj, ...@@ -1170,5 +1171,3 @@ static int SocksHandshakeTCP( vlc_object_t *p_obj,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment