[Lldb-commits] [lldb] [lldb] Android 9 has added the spawn.h header (PR #124452)

Brad Smith via lldb-commits lldb-commits at lists.llvm.org
Sat Jan 25 23:30:10 PST 2025


https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/124452

None

>From 2f773af320b8a32f0082a35392076d5a0d72e0b0 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Sun, 26 Jan 2025 02:28:39 -0500
Subject: [PATCH] [lldb] Android 9 has added the spawn.h header

---
 lldb/source/Host/common/Host.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index fdb623667bc251..eaba9995621f8a 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -26,10 +26,14 @@
 #include <mach/mach_port.h>
 #endif
 
+#ifdef __ANDROID__
+include <android/api-level.h>
+#endif
+
 #if defined(__linux__) || defined(__FreeBSD__) ||                              \
     defined(__FreeBSD_kernel__) || defined(__APPLE__) ||                       \
     defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
-#if !defined(__ANDROID__)
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 28
 #include <spawn.h>
 #endif
 #include <sys/syscall.h>



More information about the lldb-commits mailing list