[Lldb-commits] [lldb] [lldb] Android 9 has added the spawn.h header (PR #124452)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 27 06:53:40 PST 2025
================
@@ -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
----------------
enh-google wrote:
since there's no code here, you can just unconditionally _include_ <spawn.h> -- it's in every supported NDK's sysroot -- even though you won't be able to _use_ any of the functions until api 28 (so _call sites_ will need a preprocessor check, but "#include sites" shouldn't, if you see what i mean).
https://github.com/llvm/llvm-project/pull/124452
More information about the lldb-commits
mailing list