From 16bd7db5dcabe46886b4ef827d06e0283f711b67 Mon Sep 17 00:00:00 2001
From: smlng <s@mlng.net>
Date: Sat, 3 Jun 2017 21:32:22 +0200
Subject: [PATCH] posix: fix redefined clockid_t on macOS

---
 sys/posix/pthread/include/pthread_cond.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sys/posix/pthread/include/pthread_cond.h b/sys/posix/pthread/include/pthread_cond.h
index 5d34d50554..73e728629c 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
 
-- 
GitLab