summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-06-13 11:47:16 +0200
committerUlrich Müller <ulm@gentoo.org>2023-06-13 11:48:07 +0200
commit7ab122518547e3a07ea354f7102df14f256fc942 (patch)
tree728932bde310ed89eccb1f04df08882d2af9d242
parentwww-apache/passenger: add 6.0.18 (diff)
downloadgentoo-7ab122518547e3a07ea354f7102df14f256fc942.tar.gz
gentoo-7ab122518547e3a07ea354f7102df14f256fc942.tar.bz2
gentoo-7ab122518547e3a07ea354f7102df14f256fc942.zip
net-im/openmittsu: Fix compilation with MUSL libc
Closes: https://bugs.gentoo.org/907754 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--net-im/openmittsu/files/openmittsu-0.10.0.0-musl.patch25
-rw-r--r--net-im/openmittsu/openmittsu-0.10.0.0.ebuild2
2 files changed, 27 insertions, 0 deletions
diff --git a/net-im/openmittsu/files/openmittsu-0.10.0.0-musl.patch b/net-im/openmittsu/files/openmittsu-0.10.0.0-musl.patch
new file mode 100644
index 000000000000..7935ff5530d4
--- /dev/null
+++ b/net-im/openmittsu/files/openmittsu-0.10.0.0-musl.patch
@@ -0,0 +1,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)
+ {
diff --git a/net-im/openmittsu/openmittsu-0.10.0.0.ebuild b/net-im/openmittsu/openmittsu-0.10.0.0.ebuild
index 23de4770cacf..dc31c3a2ca06 100644
--- a/net-im/openmittsu/openmittsu-0.10.0.0.ebuild
+++ b/net-im/openmittsu/openmittsu-0.10.0.0.ebuild
@@ -29,6 +29,8 @@ RDEPEND="dev-db/qt5-sqlcipher
DEPEND="${RDEPEND}
test? ( >=dev-cpp/gtest-1.8.0 )"
+PATCHES=( "${FILESDIR}"/${P}-musl.patch )
+
DOCS=(
README.md
Example-client-configuration-file.ini