summaryrefslogtreecommitdiff
path: root/net-im/spectrum2/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-02 14:09:07 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-02 14:09:07 +0100
commitb17a3ef12038de50228bade1f05502c74e135321 (patch)
tree9026dffec53f92cba48ca9a500a4f778e6304380 /net-im/spectrum2/files
parent3cf7c3ef441822c889356fd1812ebf2944a59851 (diff)
gentoo resync : 02.09.2020
Diffstat (limited to 'net-im/spectrum2/files')
-rw-r--r--net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch b/net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch
new file mode 100644
index 000000000000..07bde50b832d
--- /dev/null
+++ b/net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch
@@ -0,0 +1,95 @@
+From 19b10896fa3426b2bd9e4e75a63ca52322373d33 Mon Sep 17 00:00:00 2001
+From: Vitaly Takmazov <vitalyster@gmail.com>
+Date: Fri, 24 Jul 2020 15:09:28 +0300
+Subject: [PATCH] musl compatibility
+
+---
+ backends/libpurple/main.cpp | 6 +++---
+ backends/swiften/main.cpp | 2 ++
+ libtransport/UserManager.cpp | 2 ++
+ spectrum/src/main.cpp | 2 ++
+ 4 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp
+index 54c618e0..4555edbc 100644
+--- a/backends/libpurple/main.cpp
++++ b/backends/libpurple/main.cpp
+@@ -528,7 +528,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
+
+ purple_accounts_delete_wrapped(account);
+ #ifndef WIN32
+-#if !defined(__FreeBSD__) && !defined(__APPLE__)
++#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__)
+ malloc_trim(0);
+ #endif
+ #endif
+@@ -2287,7 +2287,7 @@ static void signed_on(PurpleConnection *gc, gpointer unused) {
+ PurpleAccount *account = purple_connection_get_account_wrapped(gc);
+ np->handleConnected(np->m_accounts[account]);
+ #ifndef WIN32
+-#if !defined(__FreeBSD__) && !defined(__APPLE__)
++#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__)
+ // force returning of memory chunks allocated by libxml2 to kernel
+ malloc_trim(0);
+ #endif
+@@ -2516,7 +2516,7 @@ int main(int argc, char **argv) {
+ boost::locale::generator gen;
+ std::locale::global(gen(""));
+ #ifndef WIN32
+-#if !defined(__FreeBSD__) && !defined(__APPLE__)
++#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__)
+ mallopt(M_CHECK_ACTION, 2);
+ mallopt(M_PERTURB, 0xb);
+ #endif
+diff --git a/backends/swiften/main.cpp b/backends/swiften/main.cpp
+index f0acdb6d..6c111464 100644
+--- a/backends/swiften/main.cpp
++++ b/backends/swiften/main.cpp
+@@ -227,10 +227,12 @@ class SwiftenPlugin : public NetworkPlugin, Swift::XMPPParserClient {
+ #ifndef WIN32
+ #ifndef __FreeBSD__
+ #ifndef __MACH__
++#if defined (__GLIBC__)
+ // force returning of memory chunks allocated by libxml2 to kernel
+ malloc_trim(0);
+ #endif
+ #endif
++#endif
+ #endif
+ }
+
+diff --git a/libtransport/UserManager.cpp b/libtransport/UserManager.cpp
+index 73fcdae9..a622754f 100644
+--- a/libtransport/UserManager.cpp
++++ b/libtransport/UserManager.cpp
+@@ -125,10 +125,12 @@ void UserManager::removeUser(User *user, bool onUserBehalf) {
+ #ifndef WIN32
+ #ifndef __FreeBSD__
+ #ifndef __MACH__
++#if defined (__GLIBC__)
+ malloc_trim(0);
+ #endif
+ #endif
+ #endif
++#endif
+ // VALGRIND_DO_LEAK_CHECK;
+ }
+
+diff --git a/spectrum/src/main.cpp b/spectrum/src/main.cpp
+index 0f5985a2..89e5b9a1 100644
+--- a/spectrum/src/main.cpp
++++ b/spectrum/src/main.cpp
+@@ -320,11 +320,13 @@ int main(int argc, char **argv)
+ #ifndef WIN32
+ #ifndef __FreeBSD__
+ #ifndef __MACH__
++#if defined (__GLIBC__)
+ mallopt(M_CHECK_ACTION, 2);
+ mallopt(M_PERTURB, 0xb);
+ #endif
+ #endif
+ #endif
++#endif
+
+ #ifndef WIN32
+ if (signal(SIGINT, spectrum_sigint_handler) == SIG_ERR) {