ladybird/Ports/cavestory/patches/0001-Added-serenity-as-a-proper-define-so-that-fstat-is-u.patch

23 lines
1.0 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: gloof11 <gloof11@proton.me>
Date: Thu, 29 Jun 2023 22:23:53 +0900
Subject: [PATCH] Added serenity as a proper #define so that "fstat" is used
---
deps/spdlog/details/os.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deps/spdlog/details/os.h b/deps/spdlog/details/os.h
index 57df5a85a0a5b601b17121f1f1f17c536496b132..11b8ee434687f8b1c318c4c85b393bb438ea53b5 100644
--- a/deps/spdlog/details/os.h
+++ b/deps/spdlog/details/os.h
@@ -227,7 +227,7 @@ inline size_t filesize(FILE *f)
#else // unix
int fd = fileno(f);
// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) && !defined(__HAIKU__)
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) && !defined(__HAIKU__) && !defined(__serenity__)
struct stat64 st;
if (fstat64(fd, &st) == 0)
{