Skip to content

[lldb] Android 9 has added the spawn.h header #124452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Jan 26, 2025

No description provided.

@brad0 brad0 requested a review from JDevlieghere as a code owner January 26, 2025 07:30
@llvmbot llvmbot added the lldb label Jan 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 26, 2025

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

Changes

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

1 Files Affected:

  • (modified) lldb/source/Host/common/Host.cpp (+5-1)
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>

Copy link

github-actions bot commented Jan 26, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Collaborator

@labath labath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The messy include above this has prompted me to create #124522. You'll need to rebase if I merge this before you do. :) )

@brad0 brad0 merged commit 5ece348 into llvm:main Jan 28, 2025
4 of 6 checks passed
@brad0 brad0 deleted the lldb_spawn branch January 28, 2025 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants