Skip to content

Commit

Permalink
Thread.c: fix Availability macros
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Fedorov <[email protected]>
  • Loading branch information
barracuda156 committed Sep 17, 2024
1 parent 9942ca0 commit d1223ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int Thread_set_name(const char* thread_name)
#endif*/
#elif defined(OSX)
/* pthread_setname_np __API_AVAILABLE(macos(10.6), ios(3.2)) */
#if defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
#if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
rc = pthread_setname_np(thread_name);
#endif
#else
Expand Down Expand Up @@ -449,7 +449,7 @@ int Thread_wait_cond(cond_type condvar, int timeout_ms)
interval.tv_sec = timeout_ms / 1000;
interval.tv_nsec = (timeout_ms % 1000) * 1000000L;

#if defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 /* for older versions of MacOS */
#if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED < 101200 /* for older versions of MacOS */
struct timeval cur_time;
gettimeofday(&cur_time, NULL);
cond_timeout.tv_sec = cur_time.tv_sec;
Expand Down

0 comments on commit d1223ff

Please sign in to comment.