Skip to content

Commit

Permalink
cmake: fix build error with Xcode 9 on macOS 12
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
nbd168 committed Oct 5, 2017
1 parent 07a99a8 commit 90805b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/cmake/patches/010-backport-macos-fix.patch
Original file line number Diff line number Diff line change
@@ -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 } };

0 comments on commit 90805b1

Please sign in to comment.