summaryrefslogtreecommitdiff
path: root/tests/self1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/self1.c')
-rw-r--r--tests/self1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/self1.c b/tests/self1.c
index 773aee1..59498d9 100644
--- a/tests/self1.c
+++ b/tests/self1.c
@@ -54,9 +54,16 @@ main(int argc, char * argv[])
*/
pthread_t self;
+#ifdef PTW32_STATIC_LIB
+ pthread_win32_process_attach_np();
+#endif
+
self = pthread_self();
assert(self.p != NULL);
+#ifdef PTW32_STATIC_LIB
+ pthread_win32_process_detach_np();
+#endif
return 0;
}