aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Defresne <sdefresne@chromium.org>2016-08-10 13:39:30 -0700
committerSylvain Defresne <sdefresne@chromium.org>2016-08-10 22:01:39 +0000
commit13c634f6a1b0c8f6d713979a8ee05ab2ef61b5a4 (patch)
treeec36f01897873377c68bd7b2e94cf07e8beb169c
parentFail with a proper error message if input file is not found. (diff)
downloadbreakpad-13c634f6a1b0c8f6d713979a8ee05ab2ef61b5a4.tar.xz
Revert "Don't define |r_debug| and |link_map| on Android releases 21 and later"
This reverts commit 0fc6d0c8dfbb6e4226fd79c622b701a62c901f14 because it does not compile in Chromium due to the following error: In file included from ../../breakpad/src/client/linux/minidump_writer/linux_dumper.h:43:0, from ../../breakpad/src/client/linux/minidump_writer/minidump_writer.h:41, from ../../breakpad/src/client/linux/handler/exception_handler.h:42, from ../../components/crash/content/app/breakpad_linux.cc:44: ../../breakpad/src/common/android/include/link.h:46:9: error: multi-line comment [-Werror=comment] #endif // !defined(__aarch64__) && !defined(__x86_64__) && \ ^ > 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 BUG=629088 Change-Id: Ia8d7d0eff060d661113e544d732813820bcb69e0 Reviewed-on: https://chromium-review.googlesource.com/367717 Reviewed-by: Mark Mentovai <mark@chromium.org>
-rw-r--r--src/common/android/include/link.h26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/common/android/include/link.h b/src/common/android/include/link.h
index 75e3bb2c..e7ff8e2d 100644
--- a/src/common/android/include/link.h
+++ b/src/common/android/include/link.h
@@ -30,30 +30,15 @@
#ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H
#define GOOGLE_BREAKPAD_ANDROID_INCLUDE_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)
-
+/* 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
#if !defined(__aarch64__) && !defined(__x86_64__) && \
!(defined(__mips__) && _MIPS_SIM == _ABI64)
-#undef r_debug
-#undef link_map
-
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
@@ -81,7 +66,6 @@ struct link_map {
} // extern "C"
#endif // __cplusplus
-#endif // !defined(__aarch64__) && !defined(__x86_64__) && \
- !(defined(__mips__) && _MIPS_SIM == _ABI64)
+#endif // !defined(__aarch64__) && !defined(__x86_64__)
#endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */