winpthreads: De-duplicate `struct timespec` by including <time.h>
Reference: https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/2d855f61-fd8e-9ccc-d110-934f58974906%40reactos.org/#msg37216256
Signed-off-by: Liu Hao <lh_mouse@126.com>
diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h b/mingw-w64-libraries/winpthreads/include/pthread.h
index 15c15c6..fe0e821 100644
--- a/mingw-w64-libraries/winpthreads/include/pthread.h
+++ b/mingw-w64-libraries/winpthreads/include/pthread.h
@@ -66,6 +66,7 @@
#include <process.h>
#include <limits.h>
#include <signal.h>
+#include <time.h>
#include <sys/timeb.h>
@@ -214,20 +215,6 @@
#define pthread_cleanup_pop(E)\
(*pthread_getclean() = _pthread_cup.next, ((E) ? (_pthread_cup.func((pthread_once_t *)_pthread_cup.arg)) : (void)0));}
-/* Windows doesn't have this, so declare it ourselves. */
-#ifndef _TIMESPEC_DEFINED
-#define _TIMESPEC_DEFINED
-struct timespec {
- time_t tv_sec; /* Seconds */
- long tv_nsec; /* Nanoseconds */
-};
-
-struct itimerspec {
- struct timespec it_interval; /* Timer period */
- struct timespec it_value; /* Timer expiration */
-};
-#endif
-
#ifndef SCHED_OTHER
/* Some POSIX realtime extensions, mostly stubbed */
#define SCHED_OTHER 0