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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/124452.diff


1 Files Affected:

- (modified) lldb/source/Host/common/Host.cpp (+5-1) 


``````````diff
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>

``````````

</details>


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


More information about the lldb-commits mailing list