summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 0545e5c..fffbcde 100644
--- a/misc.c
+++ b/misc.c
@@ -144,6 +144,11 @@ pthread_self (void)
{
pthread_t self;
+#ifdef _UWIN
+ if(!ptw32_selfThreadKey)
+ return(NULL);
+#endif
+
self = (pthread_t) pthread_getspecific (ptw32_selfThreadKey);
if (self == NULL)