summaryrefslogtreecommitdiff
path: root/components/libc/compilers/common
diff options
context:
space:
mode:
authorliukangcc <[email protected]>2021-09-03 11:38:48 +0800
committerliukangcc <[email protected]>2021-09-16 09:51:33 +0800
commita3541b2a243bdf1cc49029b696b217ce752199c7 (patch)
treeed7bd0398a322fb597938f3fb476909a7cc66606 /components/libc/compilers/common
parentdca7dcb42a44249abbe6c36ce2a69355e60d1f79 (diff)
[update] support armclang and c++11.
Diffstat (limited to 'components/libc/compilers/common')
-rw-r--r--components/libc/compilers/common/none-gcc/sys/types.h1
-rw-r--r--components/libc/compilers/common/sys/time.h7
2 files changed, 5 insertions, 3 deletions
diff --git a/components/libc/compilers/common/none-gcc/sys/types.h b/components/libc/compilers/common/none-gcc/sys/types.h
index e9f44f7762..8dfffcef97 100644
--- a/components/libc/compilers/common/none-gcc/sys/types.h
+++ b/components/libc/compilers/common/none-gcc/sys/types.h
@@ -25,6 +25,7 @@ typedef signed int ssize_t; /* Used for a count of bytes or an error
#else
typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */
#endif
+typedef long suseconds_t; /* microseconds. */
typedef unsigned long useconds_t; /* microseconds (unsigned) */
typedef unsigned long dev_t;
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h
index c2320429e0..95605d47c7 100644
--- a/components/libc/compilers/common/sys/time.h
+++ b/components/libc/compilers/common/sys/time.h
@@ -48,9 +48,10 @@ rt_int8_t rt_tz_is_dst(void);
#ifndef _TIMEVAL_DEFINED
#define _TIMEVAL_DEFINED
#if !(defined(_WIN32))
-struct timeval {
- long tv_sec; /* seconds */
- long tv_usec; /* and microseconds */
+struct timeval
+{
+ time_t tv_sec; /* seconds */
+ suseconds_t tv_usec; /* and microseconds */
};
#endif
#endif /* _TIMEVAL_DEFINED */