Переглянути джерело

[libc] Fix Win32 compilation errors

tangyuxin 4 роки тому
батько
коміт
1b68098f08
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      components/libc/compilers/common/sys/time.h

+ 3 - 1
components/libc/compilers/common/sys/time.h

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