blob: 44aa8a5873d637acfd263ffdb82f788435dfbc28 [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001From 960d10e89cf60d39998dae6fdcd4f0866b753a79 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Jan 2023 12:31:35 -0800
4Subject: [PATCH] add missing <cstdint> for uint16_t
5
6This fixes build problems with gcc 13 snapshot [1]
7
8Fixes
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
15Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/276]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 apt-pkg/contrib/mmap.cc | 1 +
19 1 file changed, 1 insertion(+)
20
21diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
22index 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--
342.39.1
35