summaryrefslogtreecommitdiff
path: root/tsd.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-02-06 05:44:38 +0000
committerrpj <rpj>2001-02-06 05:44:38 +0000
commit25f0d94be4e63b1a3cea1844bc4be7849c452a75 (patch)
treea124e65563367a4f2d3780128e29a7bddddf2b4e /tsd.c
parent9171eeaa77aaa6c4c34a88f5305ee3ebbc63077c (diff)
Created experimental branch.
Diffstat (limited to 'tsd.c')
-rw-r--r--tsd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tsd.c b/tsd.c
index 4e95210..63169c7 100644
--- a/tsd.c
+++ b/tsd.c
@@ -322,6 +322,12 @@ pthread_getspecific (pthread_key_t key)
* ------------------------------------------------------
*/
{
- return (TlsGetValue (key->key));
+ int lasterror = GetLastError();
+
+ void *ptr = TlsGetValue(key->key);
+
+ SetLastError(lasterror);
+
+ return (ptr);
}