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
This commit is contained in:
parent
72e1514d30
commit
73aa7df50b
66
gcc13-fix.patch
Normal file
66
gcc13-fix.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 51b95bb315b0c6b41685641ba60eeef3bda69d1e Mon Sep 17 00:00:00 2001
|
||||
From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
|
||||
Date: Wed, 18 Jan 2023 14:57:44 +0100
|
||||
Subject: [PATCH] include <cstdint> 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 `<cstdint>` 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 `<cstdint>` have been removed
|
||||
and applications which need the `<cstdint>` 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<uint8_t*>(&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 '<cstdint>'; did you forget to '#include <cstdint>'?
|
||||
28 | #include "mfxloader.h"
|
||||
+++ |+#include <cstdint>
|
||||
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<uint8_t*>(&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<uint8_t*>(&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 '<cstdint>'; did you forget to '#include <cstdint>'?
|
||||
/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<uint8_t*>(&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<uint8_t*>(&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<uint8_t*>(&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<uint8_t*>(&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 <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <list>
|
||||
|
||||
#include "mfxloader.h"
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 6 12:09:56 UTC 2023 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
- Add upstream gcc13-fix.patch patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 8 17:43:40 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -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++
|
||||
|
Loading…
Reference in New Issue
Block a user