diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-01-23 18:37:55 -0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-10-18 05:13:24 -1000 |
| commit | f9896138087fd86c8d27a0fff162cfa830bb5de0 (patch) | |
| tree | c483818be2d64c3b67409f1da4e2eeca3465131b | |
| parent | 3f174130d30f17a87e007672eb47096ee1e85d44 (diff) | |
| download | poky-f9896138087fd86c8d27a0fff162cfa830bb5de0.tar.gz | |
apt: add missing <cstdint> for uint16_t
(From OE-Core rev: 2572b32e729831762790ebfbf930a1140657faea)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8c46ded67df2d830c8bbf5f7b82d75db81d797e2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-devtools/apt/apt_2.4.5.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch b/meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch new file mode 100644 index 0000000000..44aa8a5873 --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-add-missing-cstdint-for-uint16_t.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 960d10e89cf60d39998dae6fdcd4f0866b753a79 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 23 Jan 2023 12:31:35 -0800 | ||
| 4 | Subject: [PATCH] add missing <cstdint> for uint16_t | ||
| 5 | |||
| 6 | This fixes build problems with gcc 13 snapshot [1] | ||
| 7 | |||
| 8 | Fixes | ||
| 9 | | 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] | ||
| 10 | | 257 | uint16_t len = *reinterpret_cast<const uint16_t*>(name - sizeof(uint16_t)); | ||
| 11 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 12 | |||
| 13 | [1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html | ||
| 14 | |||
| 15 | Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/276] | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | apt-pkg/contrib/mmap.cc | 1 + | ||
| 19 | 1 file changed, 1 insertion(+) | ||
| 20 | |||
| 21 | diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc | ||
| 22 | index 642e20473..0568e1cd0 100644 | ||
| 23 | --- a/apt-pkg/contrib/mmap.cc | ||
| 24 | +++ b/apt-pkg/contrib/mmap.cc | ||
| 25 | @@ -23,6 +23,7 @@ | ||
| 26 | #include <apt-pkg/macros.h> | ||
| 27 | #include <apt-pkg/mmap.h> | ||
| 28 | |||
| 29 | +#include <cstdint> | ||
| 30 | #include <cstring> | ||
| 31 | #include <string> | ||
| 32 | #include <errno.h> | ||
| 33 | -- | ||
| 34 | 2.39.1 | ||
| 35 | |||
diff --git a/meta/recipes-devtools/apt/apt_2.4.5.bb b/meta/recipes-devtools/apt/apt_2.4.5.bb index 9ebcdfd527..9ceabcc186 100644 --- a/meta/recipes-devtools/apt/apt_2.4.5.bb +++ b/meta/recipes-devtools/apt/apt_2.4.5.bb | |||
| @@ -13,6 +13,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ | |||
| 13 | file://0001-cmake-Do-not-build-po-files.patch \ | 13 | file://0001-cmake-Do-not-build-po-files.patch \ |
| 14 | file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \ | 14 | file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \ |
| 15 | file://0001-aptwebserver.cc-Include-array.patch \ | 15 | file://0001-aptwebserver.cc-Include-array.patch \ |
| 16 | file://0001-add-missing-cstdint-for-uint16_t.patch \ | ||
| 16 | " | 17 | " |
| 17 | 18 | ||
| 18 | SRC_URI:append:class-native = " \ | 19 | SRC_URI:append:class-native = " \ |
