summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authortangyuxin <[email protected]>2021-03-16 14:07:36 +0800
committertangyuxin <[email protected]>2021-03-16 14:07:36 +0800
commit1b68098f0830ac8c0ebbf69c71e07f12c49ec03a (patch)
treeb7bc23d3dfcd57f574d1c384f9fc3522b2a6eec7 /components
parentb12615f344e7e0824ab262994f443c452be04973 (diff)
[libc] Fix Win32 compilation errors
Diffstat (limited to 'components')
-rw-r--r--components/libc/compilers/common/sys/time.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h
index 67ef1d2faa..2a40b7b805 100644
--- a/components/libc/compilers/common/sys/time.h
+++ b/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 */