diff options
Diffstat (limited to 'meta-oe/recipes-support/gperftools/gperftools/0001-Define-off64_t-as-off_t-on-musl.patch')
-rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools/0001-Define-off64_t-as-off_t-on-musl.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-Define-off64_t-as-off_t-on-musl.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-Define-off64_t-as-off_t-on-musl.patch new file mode 100644 index 000000000..2b782c204 --- /dev/null +++ b/meta-oe/recipes-support/gperftools/gperftools/0001-Define-off64_t-as-off_t-on-musl.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 41260e21e271eb1dc8b34f952ea3f90a0dc35e9e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 25 Dec 2022 20:01:29 -0800 | ||
4 | Subject: [PATCH] Define off64_t as off_t on musl | ||
5 | |||
6 | Musl's default bitlength for off_t is always 64bit therefore define | ||
7 | off64_t as off_t on musl | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/gperftools/gperftools/pull/1379] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/malloc_hook_mmap_linux.h | 5 +++++ | ||
13 | 1 file changed, 5 insertions(+) | ||
14 | |||
15 | diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h | ||
16 | index c7d8b4b..a10687e 100644 | ||
17 | --- a/src/malloc_hook_mmap_linux.h | ||
18 | +++ b/src/malloc_hook_mmap_linux.h | ||
19 | @@ -45,6 +45,11 @@ | ||
20 | #include <sys/syscall.h> | ||
21 | #include <unistd.h> | ||
22 | |||
23 | +// musl's off_t is already 64-bit | ||
24 | +#if defined(__linux__) && !defined(__GLIBC__) | ||
25 | +typedef off_t off64_t; | ||
26 | +#endif | ||
27 | + | ||
28 | // The x86-32 case and the x86-64 case differ: | ||
29 | // 32b has a mmap2() syscall, 64b does not. | ||
30 | // 64b and 32b have different calling conventions for mmap(). | ||
31 | -- | ||
32 | 2.39.0 | ||
33 | |||