summaryrefslogtreecommitdiff
path: root/media-sound/kid3/files/kid3-3.9.2-musl.patch
blob: 05eb15536386264a029469b30bfa5d6a28634968 (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
26
27
From 15655cd3f19b95d5533bdfd52b0f38c51a4fdf88 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Sat, 24 Sep 2022 17:20:06 +0200
Subject: [PATCH] Fix build on Musl libc

malloc_trim is only implemented on glibc, so rather than checking if the
OS is Linux and not Android, check if it's Linux and glibc.
---
 src/core/model/kid3application.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/model/kid3application.cpp b/src/core/model/kid3application.cpp
index d40bca83..03409d1b 100644
--- a/src/core/model/kid3application.cpp
+++ b/src/core/model/kid3application.cpp
@@ -995,7 +995,7 @@ void Kid3Application::unloadAllTags()
       taggedFile->closeFileHandle();
     }
   }
-#if defined Q_OS_LINUX && !defined Q_OS_ANDROID
+#if defined Q_OS_LINUX && defined __GLIBC__
   if (::malloc_trim(0)) {
     qDebug("Memory released by malloc_trim()");
   }
-- 
GitLab