pthread_cond.h: use 'sys/types.h' value of 'clockid_t' for avr
This enables 'pthread' support on arduino. avr-libc C90 'time.h' does not include 'sys/types.h' as POSIX expects it. However, the type previously defined conflicts with the one in 'cpu/atmega_common/avr_libc_extra/include/sys/types.h' when both are included, so include 'sys/types.h'. Maybe it should alway be included by 'time.h' but this would need its specific review.
This commit is contained in:
parent
00e0a1cf13
commit
624957252e
@ -25,14 +25,18 @@
|
||||
# include "msp430_types.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WITH_AVRLIBC__)
|
||||
/* avr-libc 'time.h' does not include 'sys/types.h' but we need 'clockid_t' */
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MACH__
|
||||
/* needed for AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER */
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
#if defined(__WITH_AVRLIBC__) || (defined(__MACH__) && !defined(AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER))
|
||||
#if !defined(AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER)
|
||||
typedef int clockid_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user