Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: src/common/android/include/link.h

Issue 2156173002: Don't define |r_debug| and |link_map| on Android releases 21 and later Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Don't redefine |r_debug| and |link_map| on Android releases 21 and later Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/android/include/link.h
diff --git a/src/common/android/include/link.h b/src/common/android/include/link.h
index e7ff8e2d8702b0037921b50c99b94f02758f6e2a..22a225e274043454f72ac68ac1b5861e579619be 100644
--- a/src/common/android/include/link.h
+++ b/src/common/android/include/link.h
@@ -30,10 +30,6 @@
#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
#if !defined(__aarch64__) && !defined(__x86_64__) && \
@@ -43,6 +39,18 @@
extern "C" {
#endif // __cplusplus
+// 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
+
struct r_debug {
int r_version;
struct link_map* r_map;
@@ -66,6 +74,10 @@ struct link_map {
} // extern "C"
#endif // __cplusplus
+#else
+
+#include_next <link.h>
rmcilroy 2016/07/21 15:04:21 Instead of including this twice (and doing the one
+
#endif // !defined(__aarch64__) && !defined(__x86_64__)
#endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698