From 15e9f8c081d8728a5478e982a622beffecc76813 Mon Sep 17 00:00:00 2001 From: dktue <2878623+dktue@users.noreply.github.com> Date: Thu, 29 Oct 2026 09:39:24 +0100 Subject: [PATCH] fix(build): only use stat64 on glibc, so musl and BSD builds work Fixes #807. Unlike #808, this keeps MSVC on its own stat64. --- src/helpers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers.cpp b/src/helpers.cpp index e05c3fde..1aab401e 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -16,7 +16,8 @@ #define stat64 __stat64 #endif -#if defined(__APPLE__) +// stat64 is a glibc extension; elsewhere (macOS, musl, the BSDs) stat is already 64-bit +#if !defined(_MSC_VER) && !defined(__GLIBC__) #define stat64 stat #endif