From 072136baeb545093ef776983512c6adc2107dd3f Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 23 Aug 2001 05:43:54 +0000 Subject: * tsd.c (pthread_getspecific): Preserve the last winsock error [from WSAGetLastError()]. --- tsd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tsd.c') diff --git a/tsd.c b/tsd.c index 3cbebae..7b692b8 100644 --- a/tsd.c +++ b/tsd.c @@ -323,10 +323,12 @@ pthread_getspecific (pthread_key_t key) */ { int lasterror = GetLastError(); + int lastWSAerror = WSAGetLastError(); void *ptr = TlsGetValue (key->key); SetLastError( lasterror ); + WSASetLastError( lastWSAerror ); return ptr; } -- cgit v1.2.3