Skip to contentSkip to conversation

package/libserial: fix gcc-13.x compile (add patch to add missing cstdint include)

PATCH Applied Peter Seiderer 2 participants 2 messages Aug 9, 2023 – Aug 10, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libserial: fix gcc-13.x compile (add patch to add missing cstdint include)

Add patch taken from upstream pull request ([1]) to fix gcc-13.x compile failure because of a missing csdtint include.

Fixes:

In file included from libserial/SerialStreamBuf.h:36,
from SerialStreamBuf.cpp:34:
./libserial/SerialPortConstants.h:93:37: error: ‘uint8_t’ was not declared in this scope

     93 |     using DataBuffer =  std::vector<uint8_t> ;
        |                                     ^~~~~~~

[1] https://github.com/crayzeewulf/libserial/pull/186

---
 ...sing-cstdint-header-for-uint8_t-type.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/libserial/0003-Add-missing-cstdint-header-for-uint8_t-type.patch
package/libserial/0003-Add-missing-cstdint-header-for-uint8_t-type.patch new file +28 -0
new file mode 100644
index 0000000000..caf02d84f7
@@ -0,0 +1,28 @@
+From b4ae3313fb313b6acb7f701d898f834133f5bd53 Mon Sep 17 00:00:00 2001
+From: Jussi <[email protected]>
+Date: Mon, 3 Jul 2023 15:59:07 +0300
+Subject: [PATCH] Add missing cstdint header for uint8_t type
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Upstream: https://github.com/crayzeewulf/libserial/commit/3b50bc2b7464ed527d1709b5c7ba86688e6aa3ec
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ src/libserial/SerialPortConstants.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libserial/SerialPortConstants.h b/src/libserial/SerialPortConstants.h
+index 4f05bd5..88dca0b 100644
+--- a/src/libserial/SerialPortConstants.h
++++ b/src/libserial/SerialPortConstants.h
+@@ -33,6 +33,7 @@
+ 
+ #pragma once
+ 
++#include <cstdint>
+ #include <limits>
+ #include <stdexcept>
+ #include <string>
+-- 
+2.41.0
+
Signature · 6 lines
2.41.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · On Wed, 9 Aug 2023 23:52:21 +0200 Peter Seiderer <[email protected]> wrote:

Add patch taken from upstream pull request ([1]) to fix gcc-13.x compile failure because of a missing csdtint include.

Fixes:

In file included from libserial/SerialStreamBuf.h:36,
from SerialStreamBuf.cpp:34:
./libserial/SerialPortConstants.h:93:37: error: ‘uint8_t’ was not declared in this scope

     93 |     using DataBuffer =  std::vector<uint8_t> ;
        |                                     ^~~~~~~
Quoted 7 lines

[1] https://github.com/crayzeewulf/libserial/pull/186

---
 ...sing-cstdint-header-for-uint8_t-type.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/libserial/0003-Add-missing-cstdint-header-for-uint8_t-type.patch

Applied to master, thanks.

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