curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

c-ares CLOCK_MONOTONIC issue on mac-os

From: Ben Greear via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 10 Feb 2024 10:21:24 -0800

I'm using macos's ability to compile on newer OS for older OS (10_8). I'm getting
warnings about CLOCK_GETTIME_MONOTONIC. A quick grep showed me this code,
but for whatever reason, it's not fixing my problem.

Is there any way to passing some explicit configure/compile argument to force
it to not use clock-monotonic on this build?

# XCode v8 bug: iOS when targeting less than v10, or MacOS when targeting less than v10.12 will
# say clock_gettime exists, it is a weak symbol that only exists in iOS10/MacOS10.12 and will
# cause a crash at runtime when running on older versions. Skip finding CLOCK_MONOTONIC on older
# OS's.
IF ((NOT APPLE) OR IOS_V10 OR MACOS_V1012)
         CHECK_SYMBOL_EXISTS (CLOCK_MONOTONIC "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOCK_GETTIME_MONOTONIC)
ENDIF ()

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-02-10