Skip to contentSkip to conversation

package/rwmem: fix build with gcc 13

PATCH In review Fabrice Fontaine 2 participants 2 messages Oct 1, 2023 – Nov 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rwmem: fix build with gcc 13

Fix the following build failure with gcc 13:

In file included from ../librwmem/itarget.h:3,

                 from ../librwmem/i2ctarget.h:4,
                 from ../librwmem/i2ctarget.cpp:1:

../librwmem/helpers.h:51:39: error: 'uint64_t' has not been declared
51 | int parse_u64(const std::string& str, uint64_t* value);
| ^~~~~~~~

Fixes:
- http://autobuild.buildroot.org/results/38f6d0fb007c3dc3c21243721395f85649442407

---
 .../rwmem/0001-include-missing-cstdint.patch  | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/rwmem/0001-include-missing-cstdint.patch
package/rwmem/0001-include-missing-cstdint.patch new file +30 -0
new file mode 100644
index 0000000000..d8369d0739
@@ -0,0 +1,30 @@
+From 84e884f99e581515b49d8973538bb17e1e6c0dc0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 26 Jan 2023 20:45:57 -0800
+Subject: [PATCH] include missing <cstdint>
+
+gcc 13 moved some includes around and as a result <cstdint> is no
+longer transitively included [1]. Explicitly include it for
+uint{32,64}_t.
+
+[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream: https://github.com/tomba/rwmem/commit/84e884f99e581515b49d8973538bb17e1e6c0dc0
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index a0a738b..8d02c9c 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,6 +1,7 @@
+ #pragma once
+ 
+ #include <cerrno>
++#include <cstdint>
+ #include <string>
+ #include <vector>
+ #include <string.h>
Signature · 6 lines
2.40.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines · On Sun, 1 Oct 2023 16:37:08 +0200 Fabrice Fontaine…

Fix the following build failure with gcc 13:

In file included from ../librwmem/itarget.h:3,

                 from ../librwmem/i2ctarget.h:4,
                 from ../librwmem/i2ctarget.cpp:1:

../librwmem/helpers.h:51:39: error: 'uint64_t' has not been declared
51 | int parse_u64(const std::string& str, uint64_t* value);
| ^~~~~~~~

Quoted 8 lines

Fixes:
- http://autobuild.buildroot.org/results/38f6d0fb007c3dc3c21243721395f85649442407

---
 .../rwmem/0001-include-missing-cstdint.patch  | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/rwmem/0001-include-missing-cstdint.patch

Thanks, but in the mean time, rwmem was bumped to a version that already includes this fix.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot