diff options
Diffstat (limited to 'pthread_getspecific.c')
-rw-r--r-- | pthread_getspecific.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pthread_getspecific.c b/pthread_getspecific.c index b05ff41..5ee1641 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -72,12 +72,15 @@ pthread_getspecific (pthread_key_t key) else { int lasterror = GetLastError (); +#if defined(RETAIN_WSALASTERROR) int lastWSAerror = WSAGetLastError (); - +#endif ptr = TlsGetValue (key->key); SetLastError (lasterror); +#if defined(RETAIN_WSALASTERROR) WSASetLastError (lastWSAerror); +#endif } return ptr; |