diff mbox series

[meta-oe] sqlite-orm: fix build with gcc-15.0.1

Message ID 20250401105258.1631515-1-mark.yang@lge.com
State Under Review
Headers show
Series [meta-oe] sqlite-orm: fix build with gcc-15.0.1 | expand

Commit Message

mark yang April 1, 2025, 10:52 a.m. UTC
From: "mark.yang" <mark.yang@lge.com>

* see more details:
  http://errors.yoctoproject.org/Errors/Details/850148/
    TOPDIR/tmp/work/core2-64-oe-linux/sqlite-orm/1.5/git/examples/synchronous.cpp:7:5: error: 'uint16_t' does not name a type
        7 |     uint16_t src_port;
        |     ^~~~~~~~
    TOPDIR/tmp/work/core2-64-oe-linux/sqlite-orm/1.5/git/examples/synchronous.cpp:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
        2 | #include <sqlite_orm/sqlite_orm.h>
    +++ |+#include <cstdint>
        3 | #include <string>

While this was backported from 6a96d1cec4(Explicitly included <cstdint> in examples and unit tests),
since it was a commit made in v1.9, only synchronous.cpp was modified as other files do not exist in the current version.

Signed-off-by: mark.yang <mark.yang@lge.com>
---
 ...01-fix-cstdint-error-with-gcc-15.0.1.patch | 52 +++++++++++++++++++
 .../sqlite-orm/sqlite-orm_1.5.bb              |  5 +-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/sqlite-orm/sqlite-orm/0001-fix-cstdint-error-with-gcc-15.0.1.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm/0001-fix-cstdint-error-with-gcc-15.0.1.patch b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm/0001-fix-cstdint-error-with-gcc-15.0.1.patch
new file mode 100644
index 0000000000..af884808f2
--- /dev/null
+++ b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm/0001-fix-cstdint-error-with-gcc-15.0.1.patch
@@ -0,0 +1,52 @@ 
+From f011501e719e0042fc6ca29ac7b33e8a14562246 Mon Sep 17 00:00:00 2001
+From: "mark.yang" <mark.yang@lge.com>
+Date: Tue, 1 Apr 2025 19:45:01 +0900
+Subject: [PATCH] fix cstdint error with gcc-15.0.1
+
+* see more details:
+  http://errors.yoctoproject.org/Errors/Details/850148/
+    TOPDIR/tmp/work/core2-64-oe-linux/sqlite-orm/1.5/git/examples/synchronous.cpp:7:5: error: 'uint16_t' does not name a type
+        7 |     uint16_t src_port;
+        |     ^~~~~~~~
+    TOPDIR/tmp/work/core2-64-oe-linux/sqlite-orm/1.5/git/examples/synchronous.cpp:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
+        2 | #include <sqlite_orm/sqlite_orm.h>
+    +++ |+#include <cstdint>
+        3 | #include <string>
+
+While this was backported from 6a96d1cec4(Explicitly included <cstdint> in examples and unit tests),
+since it was a commit made in v1.9, only synchronous.cpp was modified as other files do not exist in the current version.
+
+Signed-off-by: mark.yang <mark.yang@lge.com>
+
+Upstream-Status: Backport [6a96d1c Explicitly included <cstdint> in examples and unit tests]
+---
+ examples/synchronous.cpp | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/examples/synchronous.cpp b/examples/synchronous.cpp
+index d10da13d..b103b48c 100644
+--- a/examples/synchronous.cpp
++++ b/examples/synchronous.cpp
+@@ -1,15 +1,16 @@
+ 
+ #include <sqlite_orm/sqlite_orm.h>
++#include <cstdint>
+ #include <string>
+ 
+ struct Query {
+     std::string src_ip;
+-    uint16_t src_port;
+-    uint16_t txn_id;
+-    uint32_t tv_sec;
+-    uint32_t tv_usec;
++    std::uint16_t src_port;
++    std::uint16_t txn_id;
++    std::uint32_t tv_sec;
++    std::uint32_t tv_usec;
+     std::string name;
+-    uint16_t type;
++    std::uint16_t type;
+ };
+ 
+ int main(int, char **) {
+
diff --git a/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
index db90bc589e..17c24d5abf 100644
--- a/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
+++ b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
@@ -8,7 +8,10 @@  inherit cmake
 DEPENDS += "sqlite3"
 
 SRCREV = "e8a9e9416f421303f4b8970caab26dadf8bae98b"
-SRC_URI = "git://github.com/fnc12/sqlite_orm;protocol=https;branch=master"
+SRC_URI = " \
+    git://github.com/fnc12/sqlite_orm;protocol=https;branch=master \
+    file://0001-fix-cstdint-error-with-gcc-15.0.1.patch \
+"
 S = "${WORKDIR}/git"
 
 EXTRA_OECMAKE += "-DSqliteOrm_BuildTests=OFF -DLIB_INSTALL_DIR=${libdir} \