[source] cmake: fix build error with Xcode 9 on macOS 12

LEDE Commits lede-commits at lists.infradead.org
Thu Oct 5 12:15:45 PDT 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/90805b16b6d17dff861d456edf829858386ec559

commit 90805b16b6d17dff861d456edf829858386ec559
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Oct 5 20:44:52 2017 +0200

    cmake: fix build error with Xcode 9 on macOS 12
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 tools/cmake/patches/010-backport-macos-fix.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tools/cmake/patches/010-backport-macos-fix.patch b/tools/cmake/patches/010-backport-macos-fix.patch
new file mode 100644
index 0000000..76e92dc
--- /dev/null
+++ b/tools/cmake/patches/010-backport-macos-fix.patch
@@ -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 } };



More information about the lede-commits mailing list