commit:     711bfacdbc15f0fa865d6016a1a700662743f805
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 23 21:01:31 2024 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Jan 23 21:03:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=711bfacd

dev-lua/lanes: fix compilation with musl

Closes: https://bugs.gentoo.org/830158
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-lua/lanes/files/lanes-3.16.2-musl.patch | 27 +++++++++++++++++++++++++++
 dev-lua/lanes/lanes-3.16.2.ebuild           |  7 +++++--
 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 <[email protected]>
+Date: Tue, 23 Jan 2024 21:58:50 +0100
+Subject: [PATCH] src/threading.h: fix compilation on musl
+
+Signed-off-by: Conrad Kostecki <[email protected]>
+---
+ 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

Reply via email to