Add definition guard for struct timespec

This commit is contained in:
Kp 2013-10-27 04:11:17 +00:00
parent 36e9cfc552
commit 4a2a1bb96c

View file

@ -121,6 +121,7 @@ static int micro_frame_delay=0;
static int timer_started=0;
static struct timeval timer_expire = {0, 0};
#ifndef _TIMESPEC_DEFINED
#if !defined(HAVE_STRUCT_TIMESPEC) || !HAVE_STRUCT_TIMESPEC
struct timespec
{
@ -128,6 +129,7 @@ struct timespec
long int tv_nsec; /* Nanoseconds. */
};
#endif
#endif
#if defined(_WIN32) || defined(macintosh)
int gettimeofday(struct timeval *tv, void *tz)