From 37becfb3d3b55c3409cd3f824c0c6ee62854aa3c Mon Sep 17 00:00:00 2001 From: thomaslaurenson Date: Sun, 15 Feb 2026 10:18:48 +1300 Subject: [PATCH] Added definitions for *64 symbols in StormPort.h for MUSL compilation --- src/StormPort.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/StormPort.h b/src/StormPort.h index 61affcd..25bbb55 100644 --- a/src/StormPort.h +++ b/src/StormPort.h @@ -388,6 +388,18 @@ #define O_LARGEFILE 0 #endif +// 64-bit calls are supplied by "normal" calls on musl (like Mac) +#if defined(__linux__) && !defined(__GLIBC__) + #define stat64 stat + #define fstat64 fstat + #define lseek64 lseek + #define ftruncate64 ftruncate + #define off64_t off_t + #ifndef O_LARGEFILE + #define O_LARGEFILE 0 + #endif +#endif + // Platform-specific error codes for non-Windows platforms #ifndef ERROR_SUCCESS #define ERROR_SUCCESS 0