summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/make/test_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/make/test_common.h')
-rw-r--r--lldb/packages/Python/lldbsuite/test/make/test_common.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/make/test_common.h b/lldb/packages/Python/lldbsuite/test/make/test_common.h
index 92c3cd2bc8f..b0151afb892 100644
--- a/lldb/packages/Python/lldbsuite/test/make/test_common.h
+++ b/lldb/packages/Python/lldbsuite/test/make/test_common.h
@@ -26,7 +26,14 @@
#if defined(__linux__)
#include <sys/prctl.h>
-#if defined(PR_SET_PTRACER) && defined(PR_SET_PTRACER_ANY)
+// Android API <= 16 does not have these defined.
+#ifndef PR_SET_PTRACER
+#define PR_SET_PTRACER 0x59616d61
+#endif
+#ifndef PR_SET_PTRACER_ANY
+#define PR_SET_PTRACER_ANY ((unsigned long)-1)
+#endif
+
// For now we execute on best effort basis. If this fails for some reason, so be it.
#define lldb_enable_attach() \
do \
@@ -35,8 +42,6 @@
(void)prctl_result; \
} while (0)
-#endif
-
#else // not linux
#define lldb_enable_attach()
OpenPOWER on IntegriCloud