diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-15 13:44:18 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-15 14:51:39 +0200 |
commit | 326f8962a1a053ca238f550083b745e540a6dddb (patch) | |
tree | 6a84d35ec7afdc67c5fda3f6fc82d35abf823f56 /newlib | |
parent | 5d0c2b87c87ff6a5ec150b8b1615dc4e23539e3a (diff) | |
download | cygnal-326f8962a1a053ca238f550083b745e540a6dddb.tar.gz cygnal-326f8962a1a053ca238f550083b745e540a6dddb.tar.bz2 cygnal-326f8962a1a053ca238f550083b745e540a6dddb.zip |
Add BSD guard for clockid_t
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/include/sys/_types.h | 4 | ||||
-rw-r--r-- | newlib/libc/include/sys/types.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index 1ba4c6469..6e6e2d307 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -151,7 +151,9 @@ typedef _CLOCK_T_ __clock_t; #define _TIME_T_ long /* time() */ typedef _TIME_T_ __time_t; -#define _CLOCKID_T_ unsigned long +#define _CLOCKID_T_ unsigned long +typedef _CLOCKID_T_ __clockid_t; + #define _TIMER_T_ unsigned long typedef long __suseconds_t; /* microseconds (signed) */ diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 2338cf50b..f8db419e1 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -191,9 +191,10 @@ typedef __mode_t mode_t; /* permissions */ typedef unsigned short nlink_t; -#ifndef __clockid_t_defined -typedef _CLOCKID_T_ clockid_t; -#define __clockid_t_defined +#if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED) +typedef __clockid_t clockid_t; +#define __clockid_t_defined +#define _CLOCKID_T_DECLARED #endif #ifndef __timer_t_defined |