<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- trunk/tools/llvm-readobj/ObjDumper.cpp.orig	2019-07-11 18:34:31.000000000 -0700
+++ trunk/tools/llvm-readobj/ObjDumper.cpp	2019-07-11 18:34:44.000000000 -0700
@@ -21,6 +21,20 @@
 #include "llvm/Support/raw_ostream.h"
 #include &lt;map&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 {
 
 ObjDumper::ObjDumper(ScopedPrinter &amp;Writer) : W(Writer) {}
</pre></body></html>