Added -pthread to CFLAGS