<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- trunk/tools/llvm-objcopy/MachO/MachOReader.cpp.orig	2019-07-11 18:32:43.000000000 -0700
+++ trunk/tools/llvm-objcopy/MachO/MachOReader.cpp	2019-07-11 18:33:01.000000000 -0700
@@ -13,6 +13,20 @@
 #include "llvm/Object/MachO.h"
 #include &lt;memory&gt;
 
+#ifdef __APPLE__
+#include &lt;Availability.h&gt;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED &lt; 1070
+static size_t strnlen(const char *s, size_t maxlen) {
+  size_t l = 0;
+  while (l &lt; maxlen &amp;&amp; *s) {
+    l++;
+    s++;
+  }
+  return l;
+}
+#endif
+#endif
+
 namespace llvm {
 namespace objcopy {
 namespace macho {
</pre></body></html>