summaryrefslogtreecommitdiff
path: root/components/libc/compilers/common/sys
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-05-01 10:58:10 +0800
committerGitHub <[email protected]>2021-05-01 10:58:10 +0800
commitbeb2f046c41af176076c4fbda68291c426075068 (patch)
treede53b975bb339487b04ed2de85bbff0879e3c6d8 /components/libc/compilers/common/sys
parent072899e13760ab8e11299f8ebf6a19c282595cf2 (diff)
parent1627597fcc89a7d9babc972b5d1d46764ffc7ef8 (diff)
Merge pull request #4649 from mysterywolf/libc2
[libc][time] remove _TIMESPEC_DEFINED in common/sys/time.h and complete time.c
Diffstat (limited to 'components/libc/compilers/common/sys')
-rw-r--r--components/libc/compilers/common/sys/time.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h
index ef1c810608..24da0b6c77 100644
--- a/components/libc/compilers/common/sys/time.h
+++ b/components/libc/compilers/common/sys/time.h
@@ -18,14 +18,6 @@
extern "C" {
#endif
-/*
- * Skip define timespec for IAR version over 8.10.1 where __VER__ is 8010001.
- */
-#if defined ( __ICCARM__ ) && (__VER__ >= 8010001)
-#define _TIMESPEC_DEFINED
-#endif
-
-
#ifndef _TIMEVAL_DEFINED
#define _TIMEVAL_DEFINED
/*
@@ -40,7 +32,7 @@ struct timeval {
#endif
#endif /* _TIMEVAL_DEFINED */
-#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/) && !defined (__ICCARM__) && !defined (_WIN32)
+#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/) && !(defined(__ICCARM__) && (__VER__ >= 8010001)) && !defined(_WIN32)
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */