From 6e94c67d0a5f98189b656844a3addfa55e7dbdce Mon Sep 17 00:00:00 2001 From: Henry Hu Date: Tue, 12 May 2020 23:38:48 -0400 Subject: [PATCH] use feature test macro correctly --- posix/JackPosixSemaphore.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/posix/JackPosixSemaphore.cpp b/posix/JackPosixSemaphore.cpp index 1f4df7a4..1f50c9c7 100644 --- a/posix/JackPosixSemaphore.cpp +++ b/posix/JackPosixSemaphore.cpp @@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define _POSIX_C_SOURCE 200112L + #include "JackPosixSemaphore.h" #include "JackTools.h" #include "JackConstants.h" @@ -111,8 +113,6 @@ bool JackPosixSemaphore::Wait() return (res == 0); } -#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) // glibc feature test - bool JackPosixSemaphore::TimedWait(long usec) { int res; @@ -140,15 +140,6 @@ bool JackPosixSemaphore::TimedWait(long usec) return (res == 0); } -#else -#warning "JackPosixSemaphore::TimedWait is not supported: Jack in SYNC mode with JackPosixSemaphore will not run properly !!" - -bool JackPosixSemaphore::TimedWait(long usec) -{ - return Wait(); -} -#endif - // Server side : publish the semaphore in the global namespace bool JackPosixSemaphore::Allocate(const char* name, const char* server_name, int value) {