diff --git a/include/posix/sys/types.h b/include/posix/sys/types.h index 41a2e02634a..5e657e505ff 100644 --- a/include/posix/sys/types.h +++ b/include/posix/sys/types.h @@ -15,9 +15,17 @@ extern "C" { #include_next #endif -#ifdef CONFIG_PTHREAD_IPC #include +typedef unsigned long useconds_t; + +/* time related attributes */ +#ifndef CONFIG_NEWLIB_LIBC +typedef u32_t clockid_t; +#endif /*CONFIG_NEWLIB_LIBC */ +typedef unsigned long timer_t; + +#ifdef CONFIG_PTHREAD_IPC /* Thread attributes */ typedef struct pthread_attr_t { int priority; @@ -65,13 +73,6 @@ typedef struct pthread_barrier { typedef struct pthread_barrierattr { } pthread_barrierattr_t; -/* time related attributes */ -#ifndef CONFIG_NEWLIB_LIBC -typedef u32_t clockid_t; -#endif /*CONFIG_NEWLIB_LIBC */ -typedef unsigned long timer_t; -typedef unsigned long useconds_t; - typedef u32_t pthread_rwlockattr_t; typedef struct pthread_rwlock_obj {