From 770be1ddfb22b38eb6f3b5c31f557a03e89ea4b3 Mon Sep 17 00:00:00 2001 From: Davide Gerhard Date: Mon, 15 Apr 2019 16:11:21 +0200 Subject: [PATCH] fix apple compatibility library should permit to build sdrangel also with macOS <10.12 --- apple/apple_compat.c | 5 +++-- qrtplib/CMakeLists.txt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apple/apple_compat.c b/apple/apple_compat.c index 0fca664b7..c8775a1d7 100644 --- a/apple/apple_compat.c +++ b/apple/apple_compat.c @@ -57,10 +57,10 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) } } +#ifdef _DARWIN_FEATURE_CLOCK_GETTIME /** * Missing POSIX RealTime/Monotonic Clock */ -/* #include int clock_gettime(int clk_id, struct timespec *t) { @@ -74,5 +74,6 @@ int clock_gettime(int clk_id, struct timespec *t) { t->tv_nsec = nseconds; return 0; } -*/ +#endif + #endif // APPLE Compatibility diff --git a/qrtplib/CMakeLists.txt b/qrtplib/CMakeLists.txt index f194ca43b..c024abf5a 100644 --- a/qrtplib/CMakeLists.txt +++ b/qrtplib/CMakeLists.txt @@ -3,6 +3,7 @@ project(qrtplib) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set (qrtplib_HEADERS + ../apple/apple_compat.h rtcpapppacket.h rtcpbyepacket.h rtcpcompoundpacket.h @@ -45,6 +46,7 @@ set (qrtplib_HEADERS ) set(qrtplib_SOURCES + ../apple/apple_compat.c rtcpapppacket.cpp rtcpbyepacket.cpp rtcpcompoundpacket.cpp