diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-09-07 15:15:13 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-09-07 15:43:34 -0700 |
| commit | 29aff2bacc9e2cfa6dcc52155d2816582617f918 (patch) | |
| tree | e20b46180af1c8693c3446567af1d6afde34c8c4 | |
| parent | a8a8bd435690e24e55dcdad485e97225902cb0c8 (diff) | |
| download | nng-1.9.0.tar.gz nng-1.9.0.tar.bz2 nng-1.9.0.zip | |
fixes #1866 clock_gettime is not used on Android, even though availablev1.9.0
| -rw-r--r-- | src/platform/posix/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/platform/posix/CMakeLists.txt b/src/platform/posix/CMakeLists.txt index 857c340a..2212c8c8 100644 --- a/src/platform/posix/CMakeLists.txt +++ b/src/platform/posix/CMakeLists.txt @@ -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) |
