commit:     ddc354f096fb5d32feb6df8af4a6e2f079edd178
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  6 14:20:08 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep  6 14:48:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddc354f0

app-emulation/wine-proton: fix musl build with >=linux-headers-5.16

Closes: https://bugs.gentoo.org/868747
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../wine-proton/files/wine-proton-7.0.4-musl.patch      | 17 +++++++++++++++++
 app-emulation/wine-proton/wine-proton-7.0.4.ebuild      |  1 +
 2 files changed, 18 insertions(+)

diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.4-musl.patch 
b/app-emulation/wine-proton/files/wine-proton-7.0.4-musl.patch
new file mode 100644
index 000000000000..0776df12f241
--- /dev/null
+++ b/app-emulation/wine-proton/files/wine-proton-7.0.4-musl.patch
@@ -0,0 +1,17 @@
+Wrongly assumes that futex_waitv is missing if no glibc-only __NR_futex_waitv.
+https://bugs.gentoo.org/868747
+--- a/configure.ac
++++ b/configure.ac
+@@ -2153,2 +2153,5 @@
+ 
++dnl Check for futex_waitv structure members
++AC_CHECK_MEMBERS(struct futex_waitv.val,,,[#include <linux/futex.h>])
++
+ dnl Check for socket structure members
+--- a/dlls/ntdll/unix/fsync.c
++++ b/dlls/ntdll/unix/fsync.c
+@@ -67,2 +67,4 @@
+ # define __NR_futex_waitv 449
++#endif
++#ifndef HAVE_STRUCT_FUTEX_WAITV_VAL
+ # define FUTEX_32 2

diff --git a/app-emulation/wine-proton/wine-proton-7.0.4.ebuild 
b/app-emulation/wine-proton/wine-proton-7.0.4.ebuild
index b78eed8c93c6..b7bb3868a11a 100644
--- a/app-emulation/wine-proton/wine-proton-7.0.4.ebuild
+++ b/app-emulation/wine-proton/wine-proton-7.0.4.ebuild
@@ -95,6 +95,7 @@ QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC 
-Wl,-z,notext
 
 PATCHES=(
        "${FILESDIR}"/${PN}-7.0.4-llvm-libunwind.patch
+       "${FILESDIR}"/${PN}-7.0.4-musl.patch
        "${FILESDIR}"/${PN}-7.0.4-noexecstack.patch
        "${FILESDIR}"/${PN}-7.0.4-restore-menubuilder.patch
 )

Reply via email to