Add BSD guard for clock_t
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
parent
eba91a5d0a
commit
f18eebf797
|
@ -145,7 +145,9 @@ typedef _LOCK_RECURSIVE_T _flock_t;
|
|||
typedef void *_iconv_t;
|
||||
#endif
|
||||
|
||||
#define _CLOCK_T_ unsigned long /* clock() */
|
||||
#define _CLOCK_T_ unsigned long /* clock() */
|
||||
typedef _CLOCK_T_ __clock_t;
|
||||
|
||||
#define _TIME_T_ long /* time() */
|
||||
#define _CLOCKID_T_ unsigned long
|
||||
#define _TIMER_T_ unsigned long
|
||||
|
|
|
@ -7,9 +7,10 @@ extern "C" {
|
|||
#include <_ansi.h>
|
||||
#include <sys/_types.h>
|
||||
|
||||
#ifndef __clock_t_defined
|
||||
typedef _CLOCK_T_ clock_t;
|
||||
#define __clock_t_defined
|
||||
#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
|
||||
typedef _CLOCK_T_ clock_t;
|
||||
#define __clock_t_defined
|
||||
#define _CLOCK_T_DECLARED
|
||||
#endif
|
||||
|
||||
/* Get Process Times, P1003.1b-1993, p. 92 */
|
||||
|
|
|
@ -96,9 +96,10 @@ typedef unsigned int uint; /* System V compatibility */
|
|||
typedef unsigned long ulong; /* System V compatibility */
|
||||
#endif
|
||||
|
||||
#ifndef __clock_t_defined
|
||||
typedef _CLOCK_T_ clock_t;
|
||||
#define __clock_t_defined
|
||||
#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
|
||||
typedef _CLOCK_T_ clock_t;
|
||||
#define __clock_t_defined
|
||||
#define _CLOCK_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef __time_t_defined
|
||||
|
|
Loading…
Reference in New Issue