summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2024-01-23 22:01:31 +0100
committerConrad Kostecki <conikost@gentoo.org>2024-01-23 22:03:47 +0100
commit711bfacdbc15f0fa865d6016a1a700662743f805 (patch)
tree6401bd94168b60e8220f6ff4d3cff79e7b16aa08 /dev-lua
parentdev-debug/bpftrace: add 0.20.0 (diff)
downloadgentoo-711bfacdbc15f0fa865d6016a1a700662743f805.tar.gz
gentoo-711bfacdbc15f0fa865d6016a1a700662743f805.tar.bz2
gentoo-711bfacdbc15f0fa865d6016a1a700662743f805.zip
dev-lua/lanes: fix compilation with musl
Closes: https://bugs.gentoo.org/830158 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/lanes/files/lanes-3.16.2-musl.patch27
-rw-r--r--dev-lua/lanes/lanes-3.16.2.ebuild7
2 files changed, 32 insertions, 2 deletions
diff --git a/dev-lua/lanes/files/lanes-3.16.2-musl.patch b/dev-lua/lanes/files/lanes-3.16.2-musl.patch
new file mode 100644
index 000000000000..05508a57d85d
--- /dev/null
+++ b/dev-lua/lanes/files/lanes-3.16.2-musl.patch
@@ -0,0 +1,27 @@
+From 0e959e637b6ee85b0710e0608fe5d678ad7e0b78 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conikost@gentoo.org>
+Date: Tue, 23 Jan 2024 21:58:50 +0100
+Subject: [PATCH] src/threading.h: fix compilation on musl
+
+Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
+---
+ src/threading.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/threading.h b/src/threading.h
+index 3925076..b1706ac 100644
+--- a/src/threading.h
++++ b/src/threading.h
+@@ -113,7 +113,11 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
+ #include <pthread.h>
+
+ #ifdef PLATFORM_LINUX
+- # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
++ #if defined(__GLIBC__)
++ # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
++ #else
++ # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE
++ #endif
+ #else
+ /* OS X, ... */
+ # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE
diff --git a/dev-lua/lanes/lanes-3.16.2.ebuild b/dev-lua/lanes/lanes-3.16.2.ebuild
index 89c99904f4bc..a77abaafcacc 100644
--- a/dev-lua/lanes/lanes-3.16.2.ebuild
+++ b/dev-lua/lanes/lanes-3.16.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -31,7 +31,10 @@ BDEPEND="
HTML_DOCS=( "docs/." )
-PATCHES=( "${FILESDIR}/${PN}-3.13.0-makefile.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-3.13.0-makefile.patch"
+ "${FILESDIR}/${PN}-3.16.2-musl.patch"
+)
src_prepare() {
default