summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoungseok Jeong <youngseok1.jeong@lge.com>2025-08-19 16:43:10 +0900
committerSteve Sakoman <steve@sakoman.com>2025-08-22 07:07:19 -0700
commit6b05a9736953089e1f900a1c49cca37404737cfd (patch)
tree8f8515c0a82e27b71a37efe1290b2006d03e9fc5
parentbedb86690f169a9d097372e3c2c16cb911255344 (diff)
downloadpoky-kirkstone.tar.gz
libubootenv: backport patch to fix unknown type name 'size_t'kirkstone
Fix: ../recipe-sysroot/usr/include/libuboot.h:29:2: error: unknown type name 'size_t' size_t envsize; ^ This error can be avoided by using CXXFLAGS:append = " -include cstddef" but this way would be needed in all recipes that use libuboot.h. Therefore, Backport the patch to include <cstddef> in C++ builds. (From OE-Core rev: e401a16d8e26d25cec95fcea98d6530036cffca1) Signed-off-by: Youngseok Jeong <youngseok1.jeong@lge.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-Include-cstddef-in-the-header-for-C.patch27
-rw-r--r--meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb6
2 files changed, 32 insertions, 1 deletions
diff --git a/meta/recipes-bsp/u-boot/files/0001-Include-cstddef-in-the-header-for-C.patch b/meta/recipes-bsp/u-boot/files/0001-Include-cstddef-in-the-header-for-C.patch
new file mode 100644
index 0000000000..9a006e2cfd
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-Include-cstddef-in-the-header-for-C.patch
@@ -0,0 +1,27 @@
1From 10c9a571f1c0472799f72b1924b039aab231e95f Mon Sep 17 00:00:00 2001
2From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
3Date: Thu, 16 Dec 2021 16:19:50 +0100
4Subject: [PATCH] Include cstddef in the header for C++
5
6So C++ compiler always has access to the definition of size_t.
7
8Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
9Signed-off-by: Youngseok Jeong <youngseok1.jeong@lge.com>
10Upstream-Status: Backport [v0.3.3 https://github.com/sbabic/libubootenv/pull/19/commits/764226a7de2ea79b182d92829922489537c766fa]
11---
12 src/libuboot.h | 2 ++
13 1 file changed, 2 insertions(+)
14
15diff --git a/src/libuboot.h b/src/libuboot.h
16index 88f0558..1f305f4 100644
17--- a/src/libuboot.h
18+++ b/src/libuboot.h
19@@ -6,6 +6,8 @@
20 */
21
22 #ifdef __cplusplus
23+#include <cstddef>
24+
25 extern "C" {
26 #endif
27
diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb
index e8f58941cf..7ff57ae157 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb
@@ -10,7 +10,11 @@ LICENSE = "LGPL-2.1-only"
10LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c" 10LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
11SECTION = "libs" 11SECTION = "libs"
12 12
13SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master" 13SRC_URI = " \
14 git://github.com/sbabic/libubootenv;protocol=https;branch=master \
15 file://0001-Include-cstddef-in-the-header-for-C.patch \
16"
17
14SRCREV = "ba7564f5006d09bec51058cf4f5ac90d4dc18b3c" 18SRCREV = "ba7564f5006d09bec51058cf4f5ac90d4dc18b3c"
15 19
16S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"