Commit 04d62b00 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

gnutls: set errno on Windows too

parent 8a0477a7
...@@ -104,17 +104,15 @@ static int gnutls_Error (vlc_object_t *obj, int val) ...@@ -104,17 +104,15 @@ static int gnutls_Error (vlc_object_t *obj, int val)
case GNUTLS_E_AGAIN: case GNUTLS_E_AGAIN:
#ifdef _WIN32 #ifdef _WIN32
WSASetLastError (WSAEWOULDBLOCK); WSASetLastError (WSAEWOULDBLOCK);
#else
errno = EAGAIN;
#endif #endif
errno = EAGAIN;
break; break;
case GNUTLS_E_INTERRUPTED: case GNUTLS_E_INTERRUPTED:
#ifdef _WIN32 #ifdef _WIN32
WSASetLastError (WSAEINTR); WSASetLastError (WSAEINTR);
#else
errno = EINTR;
#endif #endif
errno = EINTR;
break; break;
default: default:
...@@ -125,9 +123,8 @@ static int gnutls_Error (vlc_object_t *obj, int val) ...@@ -125,9 +123,8 @@ static int gnutls_Error (vlc_object_t *obj, int val)
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
WSASetLastError (WSAECONNRESET); WSASetLastError (WSAECONNRESET);
#else
errno = ECONNRESET;
#endif #endif
errno = ECONNRESET;
} }
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