Skip to content

Instantly share code, notes, and snippets.

@jwinarske
Created January 20, 2024 02:22
Show Gist options
  • Save jwinarske/de835535a07cb70f7394e2a116ec19d8 to your computer and use it in GitHub Desktop.
Save jwinarske/de835535a07cb70f7394e2a116ec19d8 to your computer and use it in GitHub Desktop.
poky dunfell patch to enable building on fedora 38
From a028a2c513506a3fae0c9df0d9a68111bdd53f59 Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Fri, 19 Jan 2024 18:15:22 -0800
Subject: [PATCH] libdnf add stdint header
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
.../0001-add-missing-stdint-header.patch | 78 +++++++++++++++++++
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
2 files changed, 79 insertions(+)
create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-add-missing-stdint-header.patch
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-add-missing-stdint-header.patch b/meta/recipes-devtools/libdnf/libdnf/0001-add-missing-stdint-header.patch
new file mode 100644
index 0000000000..32a35e9ea5
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-add-missing-stdint-header.patch
@@ -0,0 +1,78 @@
+From 270f47ee064f8365cd05b57fd5a182ef47460baf Mon Sep 17 00:00:00 2001
+From: Joel Winarske <joel.winarske@gmail.com>
+Date: Sat, 20 Jan 2024 02:02:02 +0000
+Subject: [PATCH] add stdint header
+
+Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
+---
+ libdnf/conf/OptionNumber.hpp | 1 +
+ libdnf/dnf-db.cpp | 2 ++
+ libdnf/dnf-sack.cpp | 1 +
+ libdnf/hy-subject.cpp | 1 +
+ libdnf/utils/sqlite3/Sqlite3.hpp | 1 +
+ 5 files changed, 6 insertions(+)
+
+diff --git a/libdnf/conf/OptionNumber.hpp b/libdnf/conf/OptionNumber.hpp
+index 98988fd5..4444622a 100644
+--- a/libdnf/conf/OptionNumber.hpp
++++ b/libdnf/conf/OptionNumber.hpp
+@@ -26,6 +26,7 @@
+ #include "Option.hpp"
+
+ #include <functional>
++#include <cstdint>
+
+ namespace libdnf {
+
+diff --git a/libdnf/dnf-db.cpp b/libdnf/dnf-db.cpp
+index 894703d3..698a65aa 100644
+--- a/libdnf/dnf-db.cpp
++++ b/libdnf/dnf-db.cpp
+@@ -24,6 +24,8 @@
+ #include "dnf-package.h"
+ #include "transaction/Swdb.hpp"
+
++#include <cstdint>
++
+ /**
+ * dnf_db_ensure_origin_pkg:
+ * @db: a #DnfDb instance.
+diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp
+index 9c88a173..f41eae92 100644
+--- a/libdnf/dnf-sack.cpp
++++ b/libdnf/dnf-sack.cpp
+@@ -57,6 +57,7 @@ extern "C" {
+ #include <solv/solver.h>
+ }
+
++#include <cstdint>
+ #include <cstring>
+ #include <sstream>
+
+diff --git a/libdnf/hy-subject.cpp b/libdnf/hy-subject.cpp
+index dfcd2a76..6ce0358e 100644
+--- a/libdnf/hy-subject.cpp
++++ b/libdnf/hy-subject.cpp
+@@ -19,6 +19,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include <cstdint>
+ #include <stdlib.h>
+ #include <fnmatch.h>
+ #include "dnf-reldep.h"
+diff --git a/libdnf/utils/sqlite3/Sqlite3.hpp b/libdnf/utils/sqlite3/Sqlite3.hpp
+index 0c0ec969..290c8c6c 100644
+--- a/libdnf/utils/sqlite3/Sqlite3.hpp
++++ b/libdnf/utils/sqlite3/Sqlite3.hpp
+@@ -29,6 +29,7 @@
+ #include <stdexcept>
+ #include <string>
+ #include <vector>
++#include <cstdint>
+
+ class SQLite3 {
+ public:
+--
+2.43.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
index 39858ad401..16b6277ab6 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=master;protoco
file://0001-include-stdexcept-for-runtime_error.patch \
file://fix-deprecation-warning.patch \
file://0040-Mark-job-goal.upgrade-with-sltr-as-target.patch \
+ file://0001-add-missing-stdint-header.patch \
"
SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77"
--
2.43.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment