guitarix: Fix build with musl
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ PV = "0.38.0"
|
||||
SRC_URI = " \
|
||||
${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}2-${PV}.tar.xz \
|
||||
file://0001-do-not-perform-link-test-durin-cross-build.patch \
|
||||
file://0002-Fix-build-for-musl.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "c533bfd7223c42a7aef0e516f5b4cc01"
|
||||
SRC_URI[sha256sum] = "c709ec903b2ae653802bd9327c32a20a086e6a97e8d029c8d79f1a8445dd655b"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 2e98159fe860cb42458fa3b434fe0eacda5e4b97 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
||||
Date: Sun, 7 Apr 2019 20:56:49 +0200
|
||||
Subject: [PATCH] Fix build for musl
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The function mallopt and it's constants doe not seem to be defined by POSIX so
|
||||
musl does not define them. Get around by check for constants.
|
||||
|
||||
Upstream-Status: Applied [1]
|
||||
|
||||
[1] https://sourceforge.net/p/guitarix/git/ci/8ec1f3088e914e87cf2c04764b24e2bd5cafc940/
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
||||
---
|
||||
src/gx_head/gui/machine.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/gx_head/gui/machine.cpp b/src/gx_head/gui/machine.cpp
|
||||
index bdc137d..d912839 100644
|
||||
--- a/src/gx_head/gui/machine.cpp
|
||||
+++ b/src/gx_head/gui/machine.cpp
|
||||
@@ -35,8 +35,10 @@
|
||||
void set_memory_allocation() {
|
||||
if (mlockall(MCL_CURRENT | MCL_FUTURE))
|
||||
gx_print_error("system init", "mlockall failed:");
|
||||
+#if defined(M_TRIM_THRESHOLD) && defined(M_MMAP_MAX)
|
||||
mallopt(M_TRIM_THRESHOLD, -1);
|
||||
mallopt(M_MMAP_MAX, 0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
#else
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user