summaryrefslogtreecommitdiff
path: root/pthread_getspecific.c
diff options
context:
space:
mode:
authorrpj <rpj>2010-06-20 03:31:18 +0000
committerrpj <rpj>2010-06-20 03:31:18 +0000
commita3ea0b24409b89bd08c0a2268dbae834724734df (patch)
tree4629fd085756226f0cee8beba4faf66466ef0410 /pthread_getspecific.c
parent135d6f060c5e5232311af77bd0d0f500e861290c (diff)
See ChangeLogs: preparing for new release.
Diffstat (limited to 'pthread_getspecific.c')
-rw-r--r--pthread_getspecific.c5
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;