Add BSD guard for timer_t

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber 2016-04-15 13:44:19 +02:00 committed by Corinna Vinschen
parent 326f8962a1
commit 365bc664e9
2 changed files with 6 additions and 4 deletions

View File

@ -155,6 +155,7 @@ typedef _TIME_T_ __time_t;
typedef _CLOCKID_T_ __clockid_t; typedef _CLOCKID_T_ __clockid_t;
#define _TIMER_T_ unsigned long #define _TIMER_T_ unsigned long
typedef _TIMER_T_ __timer_t;
typedef long __suseconds_t; /* microseconds (signed) */ typedef long __suseconds_t; /* microseconds (signed) */

View File

@ -197,9 +197,10 @@ typedef __clockid_t clockid_t;
#define _CLOCKID_T_DECLARED #define _CLOCKID_T_DECLARED
#endif #endif
#ifndef __timer_t_defined #if !defined(__timer_t_defined) && !defined(_TIMER_T_DECLARED)
typedef _TIMER_T_ timer_t; typedef __timer_t timer_t;
#define __timer_t_defined #define __timer_t_defined
#define _TIMER_T_DECLARED
#endif #endif
typedef unsigned long useconds_t; typedef unsigned long useconds_t;