This was built on Mandrake Linux 7.0
Just do a 
gcc -o test test.c -lpthread
