--- a/tests/cleanup0.c
+++ b/tests/cleanup0.c
@@ -140,7 +140,7 @@
   int i;
   pthread_t t[NUMTHREADS + 1];
 
-  assert((t[0] = pthread_self()) != NULL);
+  assert((t[0] = pthread_self()).p != NULL);
 
   for (i = 1; i <= NUMTHREADS; i++)
     {