Visual Studio error with 'timespec' structure
Add this compiler flag:
-DHAVE_STRUCT_TIMESPEC
Despite this question is already answered correctly, there is also another way to solve this problem.
First, problem occurs because pthreads-win32
internally includes time.h
which already declares timespec struct
.
To avoid this error the only thing we should do is this:
#define HAVE_STRUCT_TIMESPEC
#include <pthread.h>