From a3541b2a243bdf1cc49029b696b217ce752199c7 Mon Sep 17 00:00:00 2001 From: liukangcc Date: Fri, 3 Sep 2021 11:38:48 +0800 Subject: [update] support armclang and c++11. --- components/libc/compilers/common/none-gcc/sys/types.h | 1 + components/libc/compilers/common/sys/time.h | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'components/libc/compilers') 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 */ -- cgit v1.3.1