diff --git a/include/posix/sys/time.h b/include/posix/sys/time.h index cd5e68b0515..9ba6a157a7b 100644 --- a/include/posix/sys/time.h +++ b/include/posix/sys/time.h @@ -7,7 +7,23 @@ #ifndef ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_ #define ZEPHYR_INCLUDE_POSIX_SYS_TIME_H_ +#ifdef CONFIG_NEWLIB_LIBC +/* Kludge to support outdated newlib version as used in SDK 0.10 for Xtensa */ +#include + +#ifdef __NEWLIB__ #include +#else +#include +struct timeval { + time_t tv_sec; + suseconds_t tv_usec; +}; +#endif + +#else +#include +#endif /* CONFIG_NEWLIB_LIBC */ #ifdef __cplusplus extern "C" {