Merge pull request #219794 from reckenrode/darwin-wine-8.x-fix

wine: fix build failure on Darwin
This commit is contained in:
Weijia Wang 2023-03-06 18:59:09 +02:00 committed by GitHub
commit 5c4218eb69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View File

@ -108,9 +108,13 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
])));
patches = [ ]
# Wine requires `MTLDevice.registryID` for `winemac.drv`, but that property is not available
# in the 10.12 SDK (current SDK on x86_64-darwin). Work around that by using selector syntax.
++ lib.optional stdenv.isDarwin ./darwin-metal-compat.patch
++ lib.optionals stdenv.isDarwin [
# Wine requires `MTLDevice.registryID` for `winemac.drv`, but that property is not available
# in the 10.12 SDK (current SDK on x86_64-darwin). Work around that by using selector syntax.
./darwin-metal-compat.patch
# Wine requires `qos.h`, which is not included by default on the 10.12 SDK in nixpkgs.
./darwin-qos.patch
]
++ patches';
configureFlags = prevConfigFlags

View File

@ -0,0 +1,12 @@
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index cde37c48b0d..be237bc0ad3 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -65,6 +65,7 @@
# undef LoadResource
# undef GetCurrentThread
# include <pthread.h>
+# include <pthread/qos.h>
# include <mach/mach.h>
# include <mach/mach_error.h>
# include <mach-o/getsect.h>