Skip to content

Commit b31f46c

Browse files
committed
修复 GCC编译时可能会导致的索引失败问题(适配stm32cubeMX生成makefile的工程)
error: unknown type name 'clock_t' https://club.rt-thread.org/ask/question/981978b1d833e9cf.html Signed-off-by: waterguy <[email protected]>
1 parent 52acf7a commit b31f46c

File tree

1 file changed

+5
-0
lines changed
  • components/libc/compilers/common/include/sys

1 file changed

+5
-0
lines changed

components/libc/compilers/common/include/sys/time.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
typedef __time64_t time_t;
2121
#endif /* _WIN32 */
2222

23+
#if defined(__GNUC__)
24+
typedef long long time_t;
25+
typedef long suseconds_t;
26+
#endif/* arm-none-eabi-gcc */
27+
2328
#ifdef __cplusplus
2429
extern "C" {
2530
#endif /* __cplusplus */

0 commit comments

Comments
 (0)