From 41260e21e271eb1dc8b34f952ea3f90a0dc35e9e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 25 Dec 2022 20:01:29 -0800 Subject: [PATCH] Define off64_t as off_t on musl Musl's default bitlength for off_t is always 64bit therefore define off64_t as off_t on musl Upstream-Status: Submitted [https://github.com/gperftools/gperftools/pull/1379] Signed-off-by: Khem Raj --- src/malloc_hook_mmap_linux.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h index c7d8b4b..a10687e 100644 --- a/src/malloc_hook_mmap_linux.h +++ b/src/malloc_hook_mmap_linux.h @@ -45,6 +45,11 @@ #include #include +// musl's off_t is already 64-bit +#if defined(__linux__) && !defined(__GLIBC__) +typedef off_t off64_t; +#endif + // The x86-32 case and the x86-64 case differ: // 32b has a mmap2() syscall, 64b does not. // 64b and 32b have different calling conventions for mmap(). -- 2.39.0