Commit b99b38eb authored by Christophe Mutricy's avatar Christophe Mutricy

Forward port [18313] and [18314]. compile fix

parent e8da76c9
...@@ -155,11 +155,18 @@ static int gnutls_Error (vlc_object_t *obj, int val) ...@@ -155,11 +155,18 @@ static int gnutls_Error (vlc_object_t *obj, int val)
switch (val) switch (val)
{ {
case GNUTLS_E_AGAIN: case GNUTLS_E_AGAIN:
#if ! defined(WIN32)
errno = EAGAIN; errno = EAGAIN;
break; break;
#endif
/* WinSock does not return EAGAIN, return EINTR instead */
case GNUTLS_E_INTERRUPTED: case GNUTLS_E_INTERRUPTED:
#if defined(WIN32)
WSASetLastError(WSAEINTR);
#else
errno = EINTR; errno = EINTR;
#endif
break; break;
default: default:
...@@ -168,7 +175,11 @@ static int gnutls_Error (vlc_object_t *obj, int val) ...@@ -168,7 +175,11 @@ static int gnutls_Error (vlc_object_t *obj, int val)
if (!gnutls_error_is_fatal (val)) if (!gnutls_error_is_fatal (val))
msg_Err (obj, "Error above should be handled"); msg_Err (obj, "Error above should be handled");
#endif #endif
#if defined(WIN32)
WSASetLastError(WSAECONNRESET);
#else
errno = ECONNRESET; errno = ECONNRESET;
#endif
} }
return -1; return -1;
} }
......
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