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>
This commit is contained in:
Liu Hao 2021-02-11 15:24:17 +08:00
parent f9dfc35fd9
commit 84c950bdab

View File

@ -66,6 +66,7 @@
#include <process.h>
#include <limits.h>
#include <signal.h>
#include <time.h>
#include <sys/timeb.h>
@ -214,20 +215,6 @@ struct _pthread_cleanup
#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