Skip to content
Snippets Groups Projects
Commit aa9f3a82 authored by Brad King's avatar Brad King
Browse files

macOS: Account for deployment target when checking for utimensat

The SDK for macOS 10.13 adds `utimensat`, but the symbol is not
available at runtime on older macOS versions.  Check the deployment
target before using the symbol.

Issue: cmake/cmake#17101
parent d85b17e7
No related branches found
No related tags found
No related merge requests found
......@@ -265,6 +265,12 @@ int main()
#ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
#include <fcntl.h>
#include <sys/stat.h>
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
#error "utimensat not available on macOS < 10.13"
#endif
#endif
int main()
{
struct timespec times[2] = { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment