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