diff --git a/sys/posix/pthread/include/pthread_cond.h b/sys/posix/pthread/include/pthread_cond.h
index 5d34d50554c62f471052b1c4bf692a081e2701e0..73e728629ced588051382a2eee8c491bba2e098e 100644
--- a/sys/posix/pthread/include/pthread_cond.h
+++ b/sys/posix/pthread/include/pthread_cond.h
@@ -25,7 +25,12 @@
 #   include "msp430_types.h"
 #endif
 
-#if defined(__MACH__) || defined(__WITH_AVRLIBC__)
+#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))
 typedef int clockid_t;
 #endif