summaryrefslogtreecommitdiff
blob: 7935ff5530d4d8ac8a5cc542e9aa9a03f284ac5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Fix compilation with MUSL libc
https://bugs.gentoo.org/907754

Patch backported from spdlog repository:
https://github.com/gabime/spdlog/commit/287a00d364990edbb621fe5e392aeb550135fb96

commit 287a00d364990edbb621fe5e392aeb550135fb96
Author: Khem Raj <raj.khem@gmail.com>
Date:   Tue Jan 3 09:54:50 2023 -0800

    Do not use LFS64 functions on linux/musl (#2589)

--- openmittsu-0.10.0.0/3rdparty/spdlog/include/spdlog/details/os-inl.h
+++ openmittsu-0.10.0.0/3rdparty/spdlog/include/spdlog/details/os-inl.h
@@ -230,8 +230,8 @@
 #else
     int fd = ::fileno(f);
 #endif
-// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
-#if (defined(__linux__) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64))
+// 64 bits(but not in osx, linux/musl or cygwin, where fstat64 is deprecated)
+#if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64))
     struct stat64 st;
     if (::fstat64(fd, &st) == 0)
     {