mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-24 00:04:58 +01:00
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>. Committed: https://chromium.googlesource.com/breakpad/breakpad/+/0ebdc4a10a506e2a4a3a039c479b40219a84b760
This commit is contained in:
parent
f7be4815a2
commit
0fc6d0c8df
1 changed files with 21 additions and 5 deletions
|
|
@ -30,15 +30,30 @@
|
|||
#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. */
|
||||
#include_next <link.h>
|
||||
|
||||
// TODO(rmcilroy): Remove this file once the ndk is updated for other
|
||||
// architectures - crbug.com/358831
|
||||
|
||||
// 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.
|
||||
|
||||
#if !defined(__aarch64__) && !defined(__x86_64__) && \
|
||||
!(defined(__mips__) && _MIPS_SIM == _ABI64)
|
||||
|
||||
#define r_debug __bionic_r_debug
|
||||
#define link_map __bionic_link_map
|
||||
|
||||
#endif // !defined(__aarch64__) && !defined(__x86_64__) && \
|
||||
!(defined(__mips__) && _MIPS_SIM == _ABI64)
|
||||
|
||||
#include_next <link.h>
|
||||
|
||||
#if !defined(__aarch64__) && !defined(__x86_64__) && \
|
||||
!(defined(__mips__) && _MIPS_SIM == _ABI64)
|
||||
|
||||
#undef r_debug
|
||||
#undef link_map
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
|
@ -66,6 +81,7 @@ struct link_map {
|
|||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // !defined(__aarch64__) && !defined(__x86_64__)
|
||||
#endif // !defined(__aarch64__) && !defined(__x86_64__) && \
|
||||
!(defined(__mips__) && _MIPS_SIM == _ABI64)
|
||||
|
||||
#endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue