From efa7f9f49c1491483910d438b3d5be927c9e5ddc Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia 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 --- 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 82674baa5..5caa31723 100644 --- llvm_master/projects/compiler-rt/lib/xray/xray_utils.cc +++ macports_master/projects/compiler-rt/lib/xray/xray_utils.cc @@ -36,6 +36,12 @@ #include #endif +#ifdef __APPLE__ +#ifndef O_CLOEXEC +#define O_CLOEXEC 0x1000000 +#endif +#endif + namespace __xray { #if SANITIZER_FUCHSIA 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 e63ee1b3b..65b59ec61 100644 --- llvm_master/projects/compiler-rt/lib/xray/xray_x86_64.cc +++ macports_master/projects/compiler-rt/lib/xray/xray_x86_64.cc @@ -26,6 +26,12 @@ #include #include +#ifdef __APPLE__ +#ifndef O_CLOEXEC +#define O_CLOEXEC 0x1000000 +#endif +#endif + namespace __xray { #if SANITIZER_LINUX -- 2.21.0 (Apple Git-120)