diff options
| author | Bernard Xiong <[email protected]> | 2021-09-18 17:55:32 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-18 17:55:32 +0800 |
| commit | 1cb19e594c2e17daaa975a8c8e7c9a9aae46b3db (patch) | |
| tree | 0d12a8627975f6e1220a1589668dbd4f019cfb4e /components/libc/compilers | |
| parent | 00221bd43f8aad4a91e44fe1a7c6fe85571df456 (diff) | |
| parent | b51602b1db901e46fd1fec4d76c669b31a538079 (diff) | |
Merge pull request #5071 from liukangcc/master
[update] support armclang and c++11.
Diffstat (limited to 'components/libc/compilers')
| -rw-r--r-- | components/libc/compilers/common/nogcc/sys/types.h | 1 | ||||
| -rw-r--r-- | components/libc/compilers/common/sys/time.h | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/components/libc/compilers/common/nogcc/sys/types.h b/components/libc/compilers/common/nogcc/sys/types.h index 2c4c12055f..5672f54a4d 100644 --- a/components/libc/compilers/common/nogcc/sys/types.h +++ b/components/libc/compilers/common/nogcc/sys/types.h @@ -27,6 +27,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 9d4422e17a..ecf6e85ac6 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 */ |
