diff options
author | Henry Hu <henry.hu.sh@gmail.com> | 2020-05-12 23:38:48 -0400 |
---|---|---|
committer | Filipe Coelho <falktx@falktx.com> | 2020-05-14 04:33:32 +0100 |
commit | 6e94c67d0a5f98189b656844a3addfa55e7dbdce (patch) | |
tree | e914bf31396d62dede140027463955591a74acf1 | |
parent | c1409c88ecfd3257fce92c9cf9d3bd45aafa367a (diff) | |
download | jack2-6e94c67d0a5f98189b656844a3addfa55e7dbdce.tar.gz |
use feature test macro correctly
-rw-r--r-- | posix/JackPosixSemaphore.cpp | 13 |
1 files 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) { |