From 900c34349238baf6c9183eae715399005b114f7e Mon Sep 17 00:00:00 2001
|
From: Khem Raj <raj.khem@gmail.com>
|
Date: Wed, 13 Feb 2019 09:51:14 -0800
|
Subject: [PATCH] __off64_t is internal private define from glibc
|
|
and should not be used as such. This patch then
|
makes it work with musl as well.
|
|
Upstream-Status: Pending
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
---
|
.../tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 8 ++++----
|
third_party/tcmalloc/vendor/src/malloc_hook_mmap_linux.h | 8 ++++----
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
|
diff --git a/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h b/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
|
index 17415aaf53..5e5480c748 100644
|
--- a/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
|
+++ b/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
|
@@ -60,7 +60,7 @@
|
|
static inline void* do_mmap64(void *start, size_t length,
|
int prot, int flags,
|
- int fd, __off64_t offset) __THROW {
|
+ int fd, off64_t offset) __THROW {
|
// The original gperftools uses sys_mmap() here. But, it is not allowed by
|
// Chromium's sandbox.
|
return (void*)syscall(SYS_mmap, start, length, prot, flags, fd, offset);
|
@@ -73,7 +73,7 @@ static inline void* do_mmap64(void *start, size_t length,
|
|
static inline void* do_mmap64(void *start, size_t length,
|
int prot, int flags,
|
- int fd, __off64_t offset) __THROW {
|
+ int fd, off64_t offset) __THROW {
|
void *result;
|
|
// Try mmap2() unless it's not supported
|
@@ -144,7 +144,7 @@ static inline void* do_mmap64(void *start, size_t length,
|
|
extern "C" {
|
void* mmap64(void *start, size_t length, int prot, int flags,
|
- int fd, __off64_t offset ) __THROW
|
+ int fd, off64_t offset ) __THROW
|
ATTRIBUTE_SECTION(malloc_hook);
|
void* mmap(void *start, size_t length,int prot, int flags,
|
int fd, off_t offset) __THROW
|
@@ -159,7 +159,7 @@ extern "C" {
|
}
|
|
extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
|
- int fd, __off64_t offset) __THROW {
|
+ int fd, off64_t offset) __THROW {
|
MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset);
|
void *result;
|
if (!MallocHook::InvokeMmapReplacement(
|
diff --git a/third_party/tcmalloc/vendor/src/malloc_hook_mmap_linux.h b/third_party/tcmalloc/vendor/src/malloc_hook_mmap_linux.h
|
index 2f6116fa45..cdeef3ac68 100755
|
--- a/third_party/tcmalloc/vendor/src/malloc_hook_mmap_linux.h
|
+++ b/third_party/tcmalloc/vendor/src/malloc_hook_mmap_linux.h
|
@@ -60,7 +60,7 @@
|
|
static inline void* do_mmap64(void *start, size_t length,
|
int prot, int flags,
|
- int fd, __off64_t offset) __THROW {
|
+ int fd, off64_t offset) __THROW {
|
return sys_mmap(start, length, prot, flags, fd, offset);
|
}
|
|
@@ -71,7 +71,7 @@ static inline void* do_mmap64(void *start, size_t length,
|
|
static inline void* do_mmap64(void *start, size_t length,
|
int prot, int flags,
|
- int fd, __off64_t offset) __THROW {
|
+ int fd, off64_t offset) __THROW {
|
void *result;
|
|
// Try mmap2() unless it's not supported
|
@@ -142,7 +142,7 @@ static inline void* do_mmap64(void *start, size_t length,
|
|
extern "C" {
|
void* mmap64(void *start, size_t length, int prot, int flags,
|
- int fd, __off64_t offset ) __THROW
|
+ int fd, off64_t offset ) __THROW
|
ATTRIBUTE_SECTION(malloc_hook);
|
void* mmap(void *start, size_t length,int prot, int flags,
|
int fd, off_t offset) __THROW
|
@@ -157,7 +157,7 @@ extern "C" {
|
}
|
|
extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
|
- int fd, __off64_t offset) __THROW {
|
+ int fd, off64_t offset) __THROW {
|
MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset);
|
void *result;
|
if (!MallocHook::InvokeMmapReplacement(
|