diff mbox series

[meta-multimedia] x265: Fix error: 'uint8_t'

Message ID 20250505143255.1548816-1-leon.anavi@konsulko.com
State Under Review
Headers show
Series [meta-multimedia] x265: Fix error: 'uint8_t' | expand

Commit Message

Leon Anavi May 5, 2025, 2:32 p.m. UTC
Include cstdint in json11.cpp Fixes:

json11.cpp:101:32: error: 'uint8_t' does not name a type

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 .../0001-json11.cpp-Include-cstdint.patch     | 33 +++++++++++++++++++
 .../recipes-multimedia/x265/x265_4.1.bb       |  5 ++-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch

Comments

Khem Raj May 5, 2025, 2:51 p.m. UTC | #1
On 5/5/25 7:32 AM, Leon Anavi via lists.openembedded.org wrote:
> Include cstdint in json11.cpp Fixes:
> 
> json11.cpp:101:32: error: 'uint8_t' does not name a type
> 
> This work was sponsored by GOVCERT.LU.
> 
> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
> ---
>   .../0001-json11.cpp-Include-cstdint.patch     | 33 +++++++++++++++++++
>   .../recipes-multimedia/x265/x265_4.1.bb       |  5 ++-
>   2 files changed, 37 insertions(+), 1 deletion(-)
>   create mode 100644 meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch
> 
> diff --git a/meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch b/meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch
> new file mode 100644
> index 0000000000..38a5a319c7
> --- /dev/null
> +++ b/meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch
> @@ -0,0 +1,33 @@
> +From 6cbd417be3f6bcbda77464db6a4d83cef3df8904 Mon Sep 17 00:00:00 2001
> +From: Leon Anavi <leon.anavi@konsulko.com>
> +Date: Mon, 5 May 2025 14:08:36 +0000
> +Subject: [PATCH] json11.cpp: Include cstdint
> +
> +Fixes:
> +
> +json11.cpp:101:32: error: 'uint8_t' does not name a type
> +
> +This work was sponsored by GOVCERT.LU.
> +
> +Upstream-Status: Inappropriate

This does seem to a good patch for upstreaming, if it is deemed to be 
inappropriate, we need a reason to mention it in the upstream-status tag.

> +
> +Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
> +---
> + dynamicHDR10/json11/json11.cpp | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/dynamicHDR10/json11/json11.cpp b/dynamicHDR10/json11/json11.cpp
> +index 7625777..74f990a 100644
> +--- a/dynamicHDR10/json11/json11.cpp
> ++++ b/dynamicHDR10/json11/json11.cpp
> +@@ -25,6 +25,7 @@
> + #include <cstdlib>
> + #include <cstdio>
> + #include <limits>
> ++#include <cstdint>
> +
> + #if _MSC_VER
> + #pragma warning(disable: 4510) //const member cannot be default initialized
> +--
> +2.39.5
> +
> diff --git a/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb b/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb
> index 23d6342d26..ae0f7758c1 100644
> --- a/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb
> +++ b/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb
> @@ -8,7 +8,10 @@ LIC_FILES_CHKSUM = "file://../COPYING;md5=c9e0427bc58f129f99728c62d4ad4091"
>   
>   DEPENDS = "nasm-native gnutls zlib libpcre numactl"
>   
> -SRC_URI = "https://bitbucket.org/multicoreware/x265_git/downloads/x265_${PV}.tar.gz"
> +SRC_URI = " \
> +    https://bitbucket.org/multicoreware/x265_git/downloads/x265_${PV}.tar.gz \
> +    file://0001-json11.cpp-Include-cstdint.patch \
> +"
>   SRC_URI[sha256sum] = "a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29"
>   S = "${WORKDIR}/x265_${PV}/source"
>   
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#117316): https://lists.openembedded.org/g/openembedded-devel/message/117316
> Mute This Topic: https://lists.openembedded.org/mt/112630481/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Leon Anavi May 5, 2025, 3:21 p.m. UTC | #2
Hi Khem,

On 5.05.25 г. 17:51 ч., Khem Raj via lists.openembedded.org wrote:
>
> This does seem to a good patch for upstreaming, if it is deemed to be 
> inappropriate, we need a reason to mention it in the upstream-status tag.
>

OK. I opened a Bitbucket pull request to x265 and I sent v2 of the patch:
https://bitbucket.org/multicoreware/x265_git/pull-requests/33

Please note it is a bit complicated. The patch is actually for json11 
which repository as far as I know was archived by the owner on Mar 26, 
2020. So the actual upstream is now read-only. I opened a Bitbucket to 
the copy of json11.cpp used by the upstream x265.

Best regards,
Leon
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch b/meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch
new file mode 100644
index 0000000000..38a5a319c7
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/x265/x265/0001-json11.cpp-Include-cstdint.patch
@@ -0,0 +1,33 @@ 
+From 6cbd417be3f6bcbda77464db6a4d83cef3df8904 Mon Sep 17 00:00:00 2001
+From: Leon Anavi <leon.anavi@konsulko.com>
+Date: Mon, 5 May 2025 14:08:36 +0000
+Subject: [PATCH] json11.cpp: Include cstdint
+
+Fixes:
+
+json11.cpp:101:32: error: 'uint8_t' does not name a type
+
+This work was sponsored by GOVCERT.LU.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
+---
+ dynamicHDR10/json11/json11.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/dynamicHDR10/json11/json11.cpp b/dynamicHDR10/json11/json11.cpp
+index 7625777..74f990a 100644
+--- a/dynamicHDR10/json11/json11.cpp
++++ b/dynamicHDR10/json11/json11.cpp
+@@ -25,6 +25,7 @@
+ #include <cstdlib>
+ #include <cstdio>
+ #include <limits>
++#include <cstdint>
+ 
+ #if _MSC_VER
+ #pragma warning(disable: 4510) //const member cannot be default initialized
+-- 
+2.39.5
+
diff --git a/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb b/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb
index 23d6342d26..ae0f7758c1 100644
--- a/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb
+++ b/meta-multimedia/recipes-multimedia/x265/x265_4.1.bb
@@ -8,7 +8,10 @@  LIC_FILES_CHKSUM = "file://../COPYING;md5=c9e0427bc58f129f99728c62d4ad4091"
 
 DEPENDS = "nasm-native gnutls zlib libpcre numactl"
 
-SRC_URI = "https://bitbucket.org/multicoreware/x265_git/downloads/x265_${PV}.tar.gz"
+SRC_URI = " \
+    https://bitbucket.org/multicoreware/x265_git/downloads/x265_${PV}.tar.gz \
+    file://0001-json11.cpp-Include-cstdint.patch \
+"
 SRC_URI[sha256sum] = "a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29"
 S = "${WORKDIR}/x265_${PV}/source"