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

Unified Diff: third_party/tcmalloc/chromium/src/base/linux_syscall_support.h

Issue 14859005: Support Android in MallocHook for mmap, munmap and mremap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed digit's comments Created 7 years, 7 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 | third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
diff --git a/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
index d768471b33fee93b6fa7ecda7bdbd87c497d0d25..bdbc4b7e3bbfc023f9ea83c34cf59974ac09a068 100644
--- a/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
+++ b/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
@@ -155,7 +155,12 @@ extern "C" {
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/types.h>
+#if defined(__ANDROID__)
+#include <sys/syscall.h>
+#include <sys/linux-syscalls.h>
+#else
#include <syscall.h>
+#endif
#include <unistd.h>
#include <linux/unistd.h>
#include <endian.h>
@@ -471,6 +476,11 @@ struct kernel_stat {
};
#endif
+// ulong is not defined in Android while used to define __llseek.
+#if defined(__ANDROID__)
+typedef unsigned long int ulong;
+#endif
+
/* Definitions missing from the standard header files */
#ifndef O_DIRECTORY
@@ -1961,7 +1971,8 @@ struct kernel_stat {
return LSS_NAME(wait4)(pid, status, options, 0);
}
#endif
- #if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+ #if (defined(__i386__) || defined(__x86_64__) || defined(__arm__)) && \
+ !defined(__ANDROID__)
LSS_INLINE _syscall4(int, openat, int, d, const char *, p, int, f, int, m)
#endif
LSS_INLINE int LSS_NAME(sigemptyset)(struct kernel_sigset_t *set) {
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698