Skip to content

Commit

Permalink
fixes #1866 clock_gettime is not used on Android, even though available
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Sep 7, 2024
1 parent a8a8bd4 commit 29aff2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/platform/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ if (NNG_PLATFORM_POSIX)
nng_check_func(getrandom NNG_HAVE_GETRANDOM)
nng_check_func(arc4random_buf NNG_HAVE_ARC4RANDOM)

nng_check_lib(rt clock_gettime NNG_HAVE_CLOCK_GETTIME)
nng_check_func(clock_gettime NNG_HAVE_CLOCK_GETTIME_LIBC)
if (NNG_HAVE_CLOCK_GETTIME_LIBC)
nng_defines_if(NNG_HAVE_CLOCK_GETTIME_LIBC NNG_HAVE_CLOCK_GETTIME)
else()
nng_check_lib(rt clock_gettime NNG_HAVE_CLOCK_GETTIME)
endif()
nng_check_lib(pthread sem_wait NNG_HAVE_SEMAPHORE_PTHREAD)
nng_check_lib(pthread pthread_atfork NNG_HAVE_PTHREAD_ATFORK_PTHREAD)
nng_check_lib(pthread pthread_set_name_np NNG_HAVE_PTHREAD_SET_NAME_NP)
Expand Down

0 comments on commit 29aff2b

Please sign in to comment.