From 73aa7df50bcd95e046c9d0c9c2c4889929ab62f3c9976ddd4399f19943e2b27a Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 8 Mar 2023 09:43:21 +0000 Subject: [PATCH] Accepting request 1069616 from home:marxin:branches:X11:XOrg - Add upstream gcc13-fix.patch patch. OBS-URL: https://build.opensuse.org/request/show/1069616 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libmfx?expand=0&rev=51 --- gcc13-fix.patch | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ libmfx.changes | 5 ++++ libmfx.spec | 1 + 3 files changed, 72 insertions(+) create mode 100644 gcc13-fix.patch diff --git a/gcc13-fix.patch b/gcc13-fix.patch new file mode 100644 index 0000000..5c9d831 --- /dev/null +++ b/gcc13-fix.patch @@ -0,0 +1,66 @@ +From 51b95bb315b0c6b41685641ba60eeef3bda69d1e Mon Sep 17 00:00:00 2001 +From: Dominik 'Rathann' Mierzejewski +Date: Wed, 18 Jan 2023 14:57:44 +0100 +Subject: [PATCH] include explicitly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Prior to gcc-13 various C++ headers in gcc included `` even +though it was not strictly necessary; this results in the compiler +having to parse unnecessary code and thus slows down compilation for +everyone.  Those unnecessary #includes of `` have been removed +and applications which need the `` header file need to +explicitly include it. + +Without the patch, when compiling with gcc-13 you will get this error: + +``` +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp: In function 'std::string MFX::printCodecId(mfxU32)': +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:3: error: 'uint8_t' was not declared in this scope + 60 | uint8_t* data = reinterpret_cast(&id); + | ^~~~~~~ +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:29:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? + 28 | #include "mfxloader.h" + +++ |+#include + 29 | +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:12: error: 'data' was not declared in this scope + 60 | uint8_t* data = reinterpret_cast(&id); + | ^~~~ +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:36: error: 'uint8_t' does not name a type + 60 | uint8_t* data = reinterpret_cast(&id); + | ^~~~~~~ +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:36: note: 'uint8_t' is defined in header ''; did you forget to '#include '? +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:43: error: expected '>' before '*' token + 60 | uint8_t* data = reinterpret_cast(&id); + | ^ +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:43: error: expected '(' before '*' token + 60 | uint8_t* data = reinterpret_cast(&id); + | ^ + | ( +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:44: error: expected primary-expression before '>' token + 60 | uint8_t* data = reinterpret_cast(&id); + | ^ +/builddir/build/BUILD/MediaSDK-intel-mediasdk-22.6.4/api/mfx_dispatch/linux/mfxparser.cpp:60:50: error: expected ')' before ';' token + 60 | uint8_t* data = reinterpret_cast(&id); + | ^ + | ) +``` + +Fixes issue #2954 . +--- + api/mfx_dispatch/linux/mfxparser.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/api/mfx_dispatch/linux/mfxparser.cpp b/api/mfx_dispatch/linux/mfxparser.cpp +index 9d3823ec3e..beea53220c 100644 +--- a/api/mfx_dispatch/linux/mfxparser.cpp ++++ b/api/mfx_dispatch/linux/mfxparser.cpp +@@ -23,6 +23,7 @@ + #include + #include + ++#include + #include + + #include "mfxloader.h" diff --git a/libmfx.changes b/libmfx.changes index 6916533..41a3e54 100644 --- a/libmfx.changes +++ b/libmfx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 6 12:09:56 UTC 2023 - Martin Liška + +- Add upstream gcc13-fix.patch patch. + ------------------------------------------------------------------- Sun Jan 8 17:43:40 UTC 2023 - Dirk Müller diff --git a/libmfx.spec b/libmfx.spec index 4e06e55..78e92ad 100644 --- a/libmfx.spec +++ b/libmfx.spec @@ -27,6 +27,7 @@ Group: Development/Languages/C and C++ URL: https://github.com/Intel-Media-SDK/MediaSDK Source0: %{url}/archive/intel-mediasdk-%{version}.tar.gz Patch0: cmake-sle12.patch +Patch1: gcc13-fix.patch BuildRequires: cmake %if 0%{?suse_version} < 1500 BuildRequires: gcc7-c++