Skip to contentSkip to conversation

harfbuzz: Add missing <cstdio> and <cstdlib> includes

PATCH New Khem Raj 1 participant 3 messages Jan 24, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 harfbuzz: Add missing <cstdio> and <cstdlib> includes

---
 ...subset-threads.cc-add-missing-cstdio.patch | 34 +++++++++++++++++++
 .../harfbuzz/harfbuzz_6.0.0.bb                |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/harfbuzz/harfbuzz/0001-test-threads-hb-subset-threads.cc-add-missing-cstdio.patch
meta/recipes-graphics/harfbuzz/harfbuzz/0001-test-threads-hb-subset-threads.cc-add-missing-cstdio.patch new file +34 -0
new file mode 100644
index 0000000000..13819f5cf8
@@ -0,0 +1,34 @@
+From 7dfa672dac958bdbc7703ab0920e167eaa126754 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <[email protected]>
+Date: Mon, 16 Jan 2023 19:49:53 +0000
+Subject: [PATCH] test/threads/hb-subset-threads.cc: add missing <cstdio> include
+
+This week's `gcc-13` snapshot cleaned further up it's standard headers
+and exposed missing declaration as a build failure:
+
+    ../test/threads/hb-subset-threads.cc: In function 'void test_operation(operation_t, const char*, const test_input_t&)':
+    ../test/threads/hb-subset-threads.cc:127:3: error: 'printf' was not declared in this scope
+
+    ../test/threads/hb-subset-threads.cc: In function 'int main(int, char**)':
+    ../test/threads/hb-subset-threads.cc:157:19: error: 'atoi' was not declared in this scope
+
+Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/7dfa672dac958bdbc7703ab0920e167eaa126754]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ test/threads/hb-subset-threads.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/test/threads/hb-subset-threads.cc b/test/threads/hb-subset-threads.cc
+index 9d86d8d51..f0e4b7e2a 100644
+--- a/test/threads/hb-subset-threads.cc
++++ b/test/threads/hb-subset-threads.cc
+@@ -1,4 +1,6 @@
+ #include <cassert>
++#include <cstdio>
++#include <cstdlib>
+ #include <cstring>
+ #include <thread>
+ #include <condition_variable>
+-- 
+2.39.1
+
meta/recipes-graphics/harfbuzz/harfbuzz_6.0.0.bb +2 -1
index ae54bad643..1fce127d07 100644
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ee0f16281694fb6aa689cca1e0fb3da \
                     file://src/hb-ucd.cc;beginline=1;endline=15;md5=29d4dcb6410429195df67efe3382d8bc \
                     "
 
-SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BPN}-${PV}.tar.xz"
+SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BPN}-${PV}.tar.xz \
+           file://0001-test-threads-hb-subset-threads.cc-add-missing-cstdio.patch"
 SRC_URI[sha256sum] = "1d1010a1751d076d5291e433c138502a794d679a7498d1268ee21e2d4a140eb4"
 
 inherit meson pkgconfig lib_package gtk-doc gobject-introspection github-releases
Signature · 1 line
2.39.1
author
#1 lore raw

PATCH 2/3 apt: add missing <cstdint> for uint16_t

---
 ...001-add-missing-cstdint-for-uint16_t.patch | 35 +++++++++++++++++++
 meta/recipes-devtools/apt/apt_2.4.5.bb        |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch
meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch new file +35 -0
new file mode 100644
index 0000000000..44aa8a5873
@@ -0,0 +1,35 @@
+From 960d10e89cf60d39998dae6fdcd4f0866b753a79 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 23 Jan 2023 12:31:35 -0800
+Subject: [PATCH] add missing <cstdint> for uint16_t
+
+This fixes build problems with gcc 13 snapshot [1]
+
+Fixes
+| include/apt-pkg/pkgcache.h:257:23: warning: cast from 'char*' to 'const uint16_t*' {aka 'const short unsigned int*'} increases required alignment of target type [-Wcast-align]
+|   257 |       uint16_t len = *reinterpret_cast<const uint16_t*>(name - sizeof(uint16_t));
+|       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
+
+Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/276]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ apt-pkg/contrib/mmap.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
+index 642e20473..0568e1cd0 100644
+--- a/apt-pkg/contrib/mmap.cc
++++ b/apt-pkg/contrib/mmap.cc
+@@ -23,6 +23,7 @@
+ #include <apt-pkg/macros.h>
+ #include <apt-pkg/mmap.h>
+ 
++#include <cstdint>
+ #include <cstring>
+ #include <string>
+ #include <errno.h>
+-- 
+2.39.1
+
meta/recipes-devtools/apt/apt_2.4.5.bb +1 -0
index 4b9f804039..4ecbf98554 100644
@@ -16,6 +16,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \
            file://0001-Remove-using-std-binary_function.patch \
            file://0001-typecast-time_t-and-suseconds_t-from-std-chrono.patch \
            file://0002-interactive-helper-Undefine-_FORTIFY_SOURCE.patch \
+           file://0001-add-missing-cstdint-for-uint16_t.patch \
            "
 
 SRC_URI:append:class-native = " \
Signature · 1 line
2.39.1
author
#2 lore raw

PATCH 3/3 vulkan-samples: Include missing header cstdint for uint32_t

In reply to Khem Raj
---
 ...1-parser.h-Including-missing-cstdint.patch | 37 +++++++++++++++++++
 .../vulkan/vulkan-samples_git.bb              |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/0001-parser.h-Including-missing-cstdint.patch
meta/recipes-graphics/vulkan/vulkan-samples/0001-parser.h-Including-missing-cstdint.patch new file +37 -0
new file mode 100644
index 0000000000..3f6b37dce1
@@ -0,0 +1,37 @@
+From 590bd5f81207bb55bd02b4a37f73a1f64dac452d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 23 Jan 2023 13:20:58 -0800
+Subject: [PATCH] parser.h: Including missing <cstdint>
+
+This is needed from gcc-13+ see [1]
+
+Fixes
+
+../git/framework/platform/parser.h:282:43: error: 'uint32_t' does not name a type
+  282 |                 *type       = static_cast<uint32_t>(number);
+      |                                           ^~~~~~~~
+../git/framework/platform/parser.h:21:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
+
+[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
+
+Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/602]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ framework/platform/parser.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/framework/platform/parser.h b/framework/platform/parser.h
+index 215f3d80..a5bd1344 100644
+--- a/framework/platform/parser.h
++++ b/framework/platform/parser.h
+@@ -18,6 +18,7 @@
+ #pragma once
+ 
+ #include <cassert>
++#include <cstdint>
+ #include <string>
+ #include <typeindex>
+ #include <vector>
+-- 
+2.39.1
+
meta/recipes-graphics/vulkan/vulkan-samples_git.bb +1 -0
index 7f52cb66c9..c0ce393201 100644
@@ -9,6 +9,7 @@ SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=master;prot
            file://debugfix.patch \
            file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \
            file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \
+           file://0001-parser.h-Including-missing-cstdint.patch \
            "
 
 UPSTREAM_CHECK_COMMITS = "1"
Signature · 1 line
2.39.1