From 8cfd63b86decf90b45ea1d841633d71bc2a6acca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 24 Jul 2026 22:47:29 +0200 Subject: [PATCH] Apple buildfix --- Common/File/FileUtil.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Common/File/FileUtil.cpp b/Common/File/FileUtil.cpp index 53a86f54f1..0cc02ecf0b 100644 --- a/Common/File/FileUtil.cpp +++ b/Common/File/FileUtil.cpp @@ -20,6 +20,12 @@ #ifndef UNICODE #error Win32 build requires a unicode build #endif +#elif defined(__APPLE__) +// _POSIX_SOURCE alone restricts Darwin's libc headers to POSIX.1-1990 declarations, +// which predates fseeko/ftello/ftruncate (POSIX.1-2001+) and hides them entirely - +// unlike glibc, Darwin doesn't fall back to a broader feature set here. +#define _DARWIN_C_SOURCE +#define _LARGE_TIME_API #else #define _POSIX_SOURCE #define _LARGE_TIME_API