aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cmake/patches/010-backport-macos-fix.patch
blob: 76e92dcb0ef3321a9eb7d6f2c7d96ae995d15c6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/Source/kwsys/kwsysPlatformTestsCXX.cxx
+++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx
@@ -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 } };