Merge pull request #4462 from enkiller/0316-1405

[libc] Fix Win32 compilation errors
This commit is contained in:
Bernard Xiong 2021-03-17 17:52:42 +08:00 committed by GitHub
commit 382403b9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -32,13 +32,15 @@ extern "C" {
* Structure returned by gettimeofday(2) system call, * Structure returned by gettimeofday(2) system call,
* and used in other calls. * and used in other calls.
*/ */
#if !(defined(_WIN32))
struct timeval { struct timeval {
long tv_sec; /* seconds */ long tv_sec; /* seconds */
long tv_usec; /* and microseconds */ long tv_usec; /* and microseconds */
}; };
#endif
#endif /* _TIMEVAL_DEFINED */ #endif /* _TIMEVAL_DEFINED */
#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)) && !defined (__ICCARM__) #if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)) && !defined (__ICCARM__) && !defined (_WIN32)
struct timespec { struct timespec {
time_t tv_sec; /* seconds */ time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */ long tv_nsec; /* and nanoseconds */