<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From c254025f32afe73adf830b96ad1b6abcceb02ac9 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
Date: Wed, 27 Dec 2017 23:21:37 -0800
Subject: [PATCH 2001/2002] xray: Define O_CLOEXEC for older SDKs that don't
 have it

Signed-off-by: Jeremy Huddleston Sequoia &lt;jeremyhu@apple.com&gt;
---
 lib/xray/xray_utils.cc  | 6 ++++++
 lib/xray/xray_x86_64.cc | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git llvm_release_80/projects/compiler-rt/lib/xray/xray_utils.cc macports_release_80/projects/compiler-rt/lib/xray/xray_utils.cc
index 59ba6c308..3496d3b1b 100644
--- llvm_release_80/projects/compiler-rt/lib/xray/xray_utils.cc
+++ macports_release_80/projects/compiler-rt/lib/xray/xray_utils.cc
@@ -37,6 +37,12 @@
 #include &lt;zircon/syscalls.h&gt;
 #endif
 
+#ifdef __APPLE__
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0x1000000
+#endif
+#endif
+
 namespace __xray {
 
 #if SANITIZER_FUCHSIA
diff --git llvm_release_80/projects/compiler-rt/lib/xray/xray_x86_64.cc macports_release_80/projects/compiler-rt/lib/xray/xray_x86_64.cc
index e63ee1b3b..65b59ec61 100644
--- llvm_release_80/projects/compiler-rt/lib/xray/xray_x86_64.cc
+++ macports_release_80/projects/compiler-rt/lib/xray/xray_x86_64.cc
@@ -26,6 +26,12 @@
 #include &lt;tuple&gt;
 #include &lt;unistd.h&gt;
 
+#ifdef __APPLE__
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0x1000000
+#endif
+#endif
+
 namespace __xray {
 
 #if SANITIZER_LINUX
-- 
2.20.1 (Apple Git-116)

</pre></body></html>