From 38efc111227983b8d343d00220d6a0edcc72a402 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Sat, 18 Apr 2026 23:25:44 -0400 Subject: [PATCH] Darwin: alias off64_t to off_t in NATIVE_LARGE_FILES block template_db/types.h has a #ifdef NATIVE_LARGE_FILES block that aliases ftruncate64/lseek64/open64 to their un-suffixed counterparts for platforms where glibc's *64 symbols aren't available (notably macOS). The off64_t type itself is still referenced by Raw_File::size(), Raw_File::resize(), Raw_File::seek(), so the block isn't sufficient to compile on Darwin -- Apple clang fails with: error: unknown type name 'off64_t'; did you mean 'off_t'? Adding a 'typedef off_t off64_t;' to the same guarded block fixes the build on macOS. off_t is 64-bit on all 64-bit Darwin targets, so this is semantically identical to the symbols the block already aliases. Activate via CPPFLAGS="-DNATIVE_LARGE_FILES" at configure time. --- src/template_db/types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/template_db/types.h b/src/template_db/types.h index 9d087b48d..ce6622517 100644 --- a/src/template_db/types.h +++ b/src/template_db/types.h @@ -33,6 +33,7 @@ #define ftruncate64 ftruncate #define lseek64 lseek #define open64 open +typedef off_t off64_t; #endif