<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From ec33200c611e1a81e48d2e6edab5cd9d9bb97f4f 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/2001] 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_master/projects/compiler-rt/lib/xray/xray_utils.cc macports_master/projects/compiler-rt/lib/xray/xray_utils.cc
index 68f4e8c10..cbf27dc96 100644
--- llvm_master/projects/compiler-rt/lib/xray/xray_utils.cc
+++ macports_master/projects/compiler-rt/lib/xray/xray_utils.cc
@@ -25,6 +25,12 @@
 #include &lt;unistd.h&gt;
 #include &lt;utility&gt;
 
+#ifdef __APPLE__
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0x1000000
+#endif
+#endif
+
 namespace __xray {
 
 void printToStdErr(const char *Buffer) XRAY_NEVER_INSTRUMENT {
diff --git llvm_master/projects/compiler-rt/lib/xray/xray_x86_64.cc macports_master/projects/compiler-rt/lib/xray/xray_x86_64.cc
index 51dc4ce43..ea5a70d9f 100644
--- llvm_master/projects/compiler-rt/lib/xray/xray_x86_64.cc
+++ macports_master/projects/compiler-rt/lib/xray/xray_x86_64.cc
@@ -21,6 +21,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.18.0

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