summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
authorguo <[email protected]>2022-01-04 18:53:26 +0800
committerGitHub <[email protected]>2022-01-04 18:53:26 +0800
commit126f80e2e632626882de18e1820718dac4b1f625 (patch)
tree865997c82fb24bc4d68f1b880f39d5885f3bea3a /components/libc
parent9021a3117ca16b87ece98c72a698afe0123aad9f (diff)
parentee93914d78987bbca537db3e7cb3f8a9fbaefe6c (diff)
Merge pull request #5469 from mysterywolf/simulator
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/compilers/common/nogcc/sys/errno.h8
-rw-r--r--components/libc/compilers/common/sys/time.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/components/libc/compilers/common/nogcc/sys/errno.h b/components/libc/compilers/common/nogcc/sys/errno.h
index 0452fe93a1..1c6cd6d18d 100644
--- a/components/libc/compilers/common/nogcc/sys/errno.h
+++ b/components/libc/compilers/common/nogcc/sys/errno.h
@@ -575,6 +575,10 @@ defined in armcc/errno.h
#ifndef EHWPOISON
#define EHWPOISON (ERROR_BASE_NO + 133)
#endif
-#endif
-#endif
+#elif defined(_WIN32)
+#include <errno.h>
+
+#endif /* defined(__ARMCC_VERSION) || defined(__IAR_SYSTEMS_ICC__) */
+
+#endif /* __SYS_ERRNO_H__ */
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h
index a285139649..55c60d716e 100644
--- a/components/libc/compilers/common/sys/time.h
+++ b/components/libc/compilers/common/sys/time.h
@@ -15,6 +15,9 @@
#include <sys/types.h>
#include <stdint.h>
#include <time.h>
+#ifdef _WIN32
+#include <winsock.h> /* for struct timeval */
+#endif
#ifdef __cplusplus
extern "C" {