commit:     346510d96fcfdc79f4b4448135bbf58679120f53
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 17 05:10:57 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 17 05:40:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=346510d9

media-libs/gmmlib: fix build error

Closes: https://bugs.gentoo.org/908592
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gmmlib/files/gmmlib-22.3.7_ambiguating.patch   | 27 ++++++++++++++++++++++
 media-libs/gmmlib/gmmlib-22.3.7.ebuild             |  1 +
 2 files changed, 28 insertions(+)

diff --git a/media-libs/gmmlib/files/gmmlib-22.3.7_ambiguating.patch 
b/media-libs/gmmlib/files/gmmlib-22.3.7_ambiguating.patch
new file mode 100644
index 000000000000..889573ed94a5
--- /dev/null
+++ b/media-libs/gmmlib/files/gmmlib-22.3.7_ambiguating.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/908592
+https://github.com/intel/gmmlib/issues/103
+https://github.com/intel/gmmlib/pull/104
+
+From 2526286f29d8ad3d3a5833bdc29e23e5f3300b34 Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwiz...@gmail.com>
+Date: Mon, 12 Jun 2023 11:49:51 +0200
+Subject: [PATCH] Fix ambiguating new declaration LockMAContextSyncMutex()
+
+This fixes https://github.com/intel/gmmlib/issues/103 introduced by
+commit 5e12695c2c "Multi-threaded fixes for GMM Context info"
+
+Signed-off-by: Nicolas Chauvet <kwiz...@gmail.com>
+--- a/Source/GmmLib/inc/External/Common/GmmInfo.h
++++ b/Source/GmmLib/inc/External/Common/GmmInfo.h
+@@ -627,8 +627,8 @@ typedef struct _GMM_ADAPTER_INFO_
+         GMM_ADAPTER_INFO *              GetAdapterNode(ADAPTER_BDF sBdf);   
// Replacement for GetAdapterIndex, now get adapter node from the linked list
+ 
+         // Mutexes which protect the below thread unsafe functions
+-        GMM_STATUS                      LockMAContextSyncMutex();
+-        GMM_STATUS                      UnLockMAContextSyncMutex();
++        GMM_STATUS GMM_STDCALL          LockMAContextSyncMutex();
++        GMM_STATUS GMM_STDCALL          UnLockMAContextSyncMutex();
+ 
+         // thread unsafe functions; these must be protected with 
LockMAContextSyncMutex
+         GMM_ADAPTER_INFO *              GetAdapterNodeUnlocked(ADAPTER_BDF 
sBdf);
+

diff --git a/media-libs/gmmlib/gmmlib-22.3.7.ebuild 
b/media-libs/gmmlib/gmmlib-22.3.7.ebuild
index 21abbf34e428..9cd65afb169d 100644
--- a/media-libs/gmmlib/gmmlib-22.3.7.ebuild
+++ b/media-libs/gmmlib/gmmlib-22.3.7.ebuild
@@ -22,6 +22,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-20.2.2_conditional_testing.patch
        "${FILESDIR}"/${PN}-20.3.2_cmake_project.patch
        "${FILESDIR}"/${PN}-22.1.1_custom_cflags.patch
+       "${FILESDIR}"/${PN}-22.3.7_ambiguating.patch
 )
 
 multilib_src_configure() {

Reply via email to