cmake: fix build error with Xcode 9 on macOS 12

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2017-10-05 20:44:52 +02:00
parent 07a99a83f2
commit 90805b16b6

View File

@ -0,0 +1,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 } };