diff options
author | Pavel Labath <labath@google.com> | 2017-01-24 15:35:53 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-01-24 15:35:53 +0000 |
commit | 68de04e2d2b134b21040d68f59e99e8fac0089ec (patch) | |
tree | 1a59ae3b88e489dc8a6ce738da55355b45ebd5d6 /lldb/source/Host/linux | |
parent | 3ac2ad7d6cc826dee0cdf61923f1375a77a5a194 (diff) | |
download | bcm5719-llvm-68de04e2d2b134b21040d68f59e99e8fac0089ec.tar.gz bcm5719-llvm-68de04e2d2b134b21040d68f59e99e8fac0089ec.zip |
Fix android build for r292935 (personality.h)
It turns out things are not as simple as I hoped. sys/personality.h
exists on all androids but it does not define the required symbols on
all platform levels.
Add a compile check for platform level to compile against both new and
old android headers.
llvm-svn: 292939
Diffstat (limited to 'lldb/source/Host/linux')
-rw-r--r-- | lldb/source/Host/linux/ProcessLauncherLinux.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lldb/source/Host/linux/ProcessLauncherLinux.cpp b/lldb/source/Host/linux/ProcessLauncherLinux.cpp index ec54024963f..f8dcd9a1955 100644 --- a/lldb/source/Host/linux/ProcessLauncherLinux.cpp +++ b/lldb/source/Host/linux/ProcessLauncherLinux.cpp @@ -16,16 +16,21 @@ #include "lldb/Target/ProcessLaunchInfo.h" #include <limits.h> -#ifndef __ANDROID__ -#include <sys/personality.h> -#else -#include <linux/personality.h> -#endif #include <sys/ptrace.h> #include <sys/wait.h> #include <sstream> +#ifdef __ANDROID__ +#include <android/api-level.h> +#endif + +#if defined(__ANDROID_API__) && __ANDROID_API__ < 21 +#include <linux/personality.h> +#else +#include <sys/personality.h> +#endif + using namespace lldb; using namespace lldb_private; |