--- testThreads.c.orig 2009-09-11 18:09:00.268640135 +0200 +++ testThreads.c 2009-09-11 18:12:43.412653512 +0200 @@ -107,7 +107,7 @@ for (i = 0; i < num_threads; i++) { results[i] = NULL; - tid[i] = (pthread_t) -1; + memset(&tid[i], 0, sizeof(pthread_t)); } for (i = 0; i < num_threads; i++) {