diff --git a/include/posix/posix_types.h b/include/posix/posix_types.h index 15b0ba8d2d4..93d0b10aa79 100644 --- a/include/posix/posix_types.h +++ b/include/posix/posix_types.h @@ -17,13 +17,19 @@ extern "C" { #endif +#ifndef __useconds_t_defined typedef unsigned long useconds_t; +#endif /* time related attributes */ #ifndef CONFIG_NEWLIB_LIBC +#ifndef __clockid_t_defined typedef u32_t clockid_t; +#endif #endif /*CONFIG_NEWLIB_LIBC */ +#ifndef __timer_t_defined typedef unsigned long timer_t; +#endif #ifdef CONFIG_PTHREAD_IPC /* Thread attributes */ diff --git a/include/posix/time.h b/include/posix/time.h index ce0648ed68e..65ca722e9a3 100644 --- a/include/posix/time.h +++ b/include/posix/time.h @@ -43,7 +43,12 @@ struct itimerspec { #else /* CONFIG_NEWLIB_LIBC */ /* Not Newlib */ -#include +# ifdef CONFIG_ARCH_POSIX +# include +# include +# else +# include +# endif #endif /* CONFIG_NEWLIB_LIBC */ #include