When I tried to compile this program, it failed:
#include #include #include #include voi
You probably forgot to link with the Pthreads library (using -lpthread on the command line).
-lpthread