diff options
Diffstat (limited to 'tsd.c')
-rw-r--r-- | tsd.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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; } |