diff options
author | Thomas Zimmermann <tzimmermann@mozilla.com> | 2016-07-19 17:00:51 +0100 |
---|---|---|
committer | Ross McIlroy <rmcilroy@chromium.org> | 2016-07-19 17:00:51 +0100 |
commit | 0ebdc4a10a506e2a4a3a039c479b40219a84b760 (patch) | |
tree | 4ac96fdde51b5e994d8e7ce4f25a179ff7101a3c /src/common/android | |
parent | Recover memory mappings before writing dump on ChromeOS (diff) | |
download | breakpad-0ebdc4a10a506e2a4a3a039c479b40219a84b760.tar.xz |
Don't define |r_debug| and |link_map| on Android releases 21 and later
NDKs for Android 21 and later have the data structures |r_debug| and
|link_map| defined in their header files. Defining them multiple times
generates a compiler error.
This patch protects both data structures from definition on Android 21
and later.
BUG=629088
R=rmcilroy@chromium.org
Review URL: https://codereview.chromium.org/2156173002 .
Patch from Thomas Zimmermann <tzimmermann@mozilla.com>.
Diffstat (limited to 'src/common/android')
-rw-r--r-- | src/common/android/include/link.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common/android/include/link.h b/src/common/android/include/link.h index e7ff8e2d..58180a8e 100644 --- a/src/common/android/include/link.h +++ b/src/common/android/include/link.h @@ -30,10 +30,18 @@ #ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H #define GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H -/* Android doesn't provide all the data-structures required in its <link.h>. - Provide custom version here. */ +// Android doesn't provide all the data-structures required in +// its <link.h> before release 21. Provide custom version here and +// rename Bionic-provided structures to avoid conflicts. + +#define r_debug __bionic_r_debug +#define link_map __bionic_link_map + #include_next <link.h> +#undef r_debug +#undef link_map + // TODO(rmcilroy): Remove this file once the ndk is updated for other // architectures - crbug.com/358831 #if !defined(__aarch64__) && !defined(__x86_64__) && \ |