forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-20 5a4414d1fd83d52b073fc27f6e12dc9fe3b32766
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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(