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

Unified Diff: third_party/android_crazy_linker/src/tests/test_util.h

Issue 328153002: Roll to android/platform/ndk/681f1b744aec1b0888f4c7a68165720db9670300 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fork
Patch Set: Created 6 years, 6 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
Index: third_party/android_crazy_linker/src/tests/test_util.h
diff --git a/third_party/android_crazy_linker/src/tests/test_util.h b/third_party/android_crazy_linker/src/tests/test_util.h
index 28fd39fa9f93ea7e19682d96e7abb0b77f8be96b..0b876c22da0259697c8aae46691b8cffdb76b7cd 100644
--- a/third_party/android_crazy_linker/src/tests/test_util.h
+++ b/third_party/android_crazy_linker/src/tests/test_util.h
@@ -23,6 +23,10 @@
#include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h>
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS // to get PRI and SCN in 32-bit inttypes.h
+#endif
+#include <inttypes.h>
namespace {
@@ -341,8 +345,8 @@ inline void CheckRelroMaps(int expected_count) {
if (!strstr(line, " r--"))
Panic("Shared RELRO mapping is not readonly!\n");
// Check that they can't be remapped read-write.
- unsigned vma_start, vma_end;
- if (sscanf(line, "%x-%x", &vma_start, &vma_end) != 2)
+ uint64_t vma_start, vma_end;
+ if (sscanf(line, "%" SCNx64 "-%" SCNx64, &vma_start, &vma_end) != 2)
Panic("Could not parse VM address range!\n");
int ret = ::mprotect(
(void*)vma_start, vma_end - vma_start, PROT_READ | PROT_WRITE);

Powered by Google App Engine
This is Rietveld 408576698