summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbe Kohandel <abe.kohandel@gmail.com>2023-08-27 21:48:02 -0700
committerSteve Sakoman <steve@sakoman.com>2023-09-08 16:09:42 -1000
commit4bf9d11c4b09e4ff7fd140530dd7e43aa7ee6312 (patch)
tree18bc38df7d5a0b1011a13ae924bb2f393c33c900
parentb714a94ea70c614baa5243c09617d1a25c0a5ffa (diff)
downloadpoky-4bf9d11c4b09e4ff7fd140530dd7e43aa7ee6312.tar.gz
libdnf: resolve cstdint inclusion for newer gcc versions
Depending on the host gcc version, libdnf fails to compile due to missing cstdint inclusions. These issue have already been addressed upstream, add the patches to resolve this for older versions of the library. These commits are taken directly from the libdnf project at https://github.com/rpm-software-management/libdnf (From OE-Core rev: e1d9bc1f88bd989bafc20063938d7a70e1da104f) Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch56
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-libdnf-conf-OptionNumber.hpp-add-missing-cstdint-inc.patch33
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-libdnf-utils-sqlite3-Sqlite3.hpp-add-missing-cstdint.patch36
-rw-r--r--meta/recipes-devtools/libdnf/libdnf_0.66.0.bb3
4 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
new file mode 100644
index 0000000000..277fd9fbf6
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
@@ -0,0 +1,56 @@
1From 779ea105564b6d717300af2fcb02a399737a536f Mon Sep 17 00:00:00 2001
2From: ctxnop <ctxnop@gmail.com>
3Date: Mon, 15 May 2023 19:30:16 +0200
4Subject: [PATCH] Fix #1558: Don't assume inclusion of cstdint
5
6With last versions of gcc, some headers don't include cstdint anymore,
7but some sources assume that it is.
8
9Upstream-Status: Backport [https://github.com/rpm-software-management/libdnf/commit/779ea105564b6d717300af2fcb02a399737a536f]
10Signed-off-by: ctxnop <ctxnop@gmail.com>
11---
12 libdnf/conf/ConfigMain.hpp | 1 +
13 libdnf/conf/ConfigRepo.hpp | 1 +
14 libdnf/conf/OptionSeconds.hpp | 2 ++
15 3 files changed, 4 insertions(+)
16
17diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp
18index 19395c71..59f65c48 100644
19--- a/libdnf/conf/ConfigMain.hpp
20+++ b/libdnf/conf/ConfigMain.hpp
21@@ -32,6 +32,7 @@
22 #include "OptionString.hpp"
23 #include "OptionStringList.hpp"
24
25+#include <cstdint>
26 #include <memory>
27
28 namespace libdnf {
29diff --git a/libdnf/conf/ConfigRepo.hpp b/libdnf/conf/ConfigRepo.hpp
30index 2b198441..84cafbad 100644
31--- a/libdnf/conf/ConfigRepo.hpp
32+++ b/libdnf/conf/ConfigRepo.hpp
33@@ -26,6 +26,7 @@
34 #include "ConfigMain.hpp"
35 #include "OptionChild.hpp"
36
37+#include <cstdint>
38 #include <memory>
39
40 namespace libdnf {
41diff --git a/libdnf/conf/OptionSeconds.hpp b/libdnf/conf/OptionSeconds.hpp
42index dc714b23..a80a973f 100644
43--- a/libdnf/conf/OptionSeconds.hpp
44+++ b/libdnf/conf/OptionSeconds.hpp
45@@ -25,6 +25,8 @@
46
47 #include "OptionNumber.hpp"
48
49+#include <cstdint>
50+
51 namespace libdnf {
52
53 /**
54--
552.42.0
56
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-conf-OptionNumber.hpp-add-missing-cstdint-inc.patch b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-conf-OptionNumber.hpp-add-missing-cstdint-inc.patch
new file mode 100644
index 0000000000..abb9504e6e
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-conf-OptionNumber.hpp-add-missing-cstdint-inc.patch
@@ -0,0 +1,33 @@
1From f8af6399c4f6a65a35d33ecc191bb14094dc9e18 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Fri, 27 May 2022 22:13:48 +0100
4Subject: [PATCH] libdnf/conf/OptionNumber.hpp: add missing <cstdint> include
5
6Without the change libdnf build fails on this week's gcc-13 snapshot as:
7
8 In file included from /build/libdnf/libdnf/conf/ConfigMain.hpp:29,
9 from /build/libdnf/libdnf/conf/ConfigMain.cpp:21:
10 /build/libdnf/libdnf/conf/OptionNumber.hpp:94:41: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
11 94 | extern template class OptionNumber<std::int32_t>;
12 | ^~~~~~~
13
14Upstream-Status: Backport [https://github.com/rpm-software-management/libdnf/commit/f8af6399c4f6a65a35d33ecc191bb14094dc9e18]
15---
16 libdnf/conf/OptionNumber.hpp | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/libdnf/conf/OptionNumber.hpp b/libdnf/conf/OptionNumber.hpp
20index f7a7b3d6..a3a4dea6 100644
21--- a/libdnf/conf/OptionNumber.hpp
22+++ b/libdnf/conf/OptionNumber.hpp
23@@ -25,6 +25,7 @@
24
25 #include "Option.hpp"
26
27+#include <cstdint>
28 #include <functional>
29
30 namespace libdnf {
31--
322.42.0
33
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-utils-sqlite3-Sqlite3.hpp-add-missing-cstdint.patch b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-utils-sqlite3-Sqlite3.hpp-add-missing-cstdint.patch
new file mode 100644
index 0000000000..adde48ee46
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-utils-sqlite3-Sqlite3.hpp-add-missing-cstdint.patch
@@ -0,0 +1,36 @@
1From 24b5d7f154cac9e322dd3459f6d0a5016abbbb57 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Fri, 27 May 2022 22:12:07 +0100
4Subject: [PATCH] libdnf/utils/sqlite3/Sqlite3.hpp: add missing <cstdint>
5 include
6
7Without the change libdnf build fails on this week's gcc-13 snapshot as:
8
9 In file included from /build/libdnf/libdnf/sack/../transaction/Swdb.hpp:38,
10 from /build/libdnf/libdnf/sack/query.hpp:32,
11 from /build/libdnf/libdnf/dnf-sack-private.hpp:31,
12 from /build/libdnf/libdnf/hy-iutil.cpp:60:
13 /build/libdnf/libdnf/sack/../transaction/../utils/sqlite3/Sqlite3.hpp:100:33: error: 'std::int64_t' has not been declared
14 100 | void bind(int pos, std::int64_t val)
15 | ^~~~~~~
16
17Upstream-Status: Backport [https://github.com/rpm-software-management/libdnf/commit/24b5d7f154cac9e322dd3459f6d0a5016abbbb57]
18---
19 libdnf/utils/sqlite3/Sqlite3.hpp | 1 +
20 1 file changed, 1 insertion(+)
21
22diff --git a/libdnf/utils/sqlite3/Sqlite3.hpp b/libdnf/utils/sqlite3/Sqlite3.hpp
23index 3a7da23c..0403bb33 100644
24--- a/libdnf/utils/sqlite3/Sqlite3.hpp
25+++ b/libdnf/utils/sqlite3/Sqlite3.hpp
26@@ -27,6 +27,7 @@
27
28 #include <sqlite3.h>
29
30+#include <cstdint>
31 #include <map>
32 #include <memory>
33 #include <stdexcept>
34--
352.42.0
36
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
index 2558f96851..bd06937ed8 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
@@ -11,6 +11,9 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;p
11 file://enable_test_data_dir_set.patch \ 11 file://enable_test_data_dir_set.patch \
12 file://0001-drop-FindPythonInstDir.cmake.patch \ 12 file://0001-drop-FindPythonInstDir.cmake.patch \
13 file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \ 13 file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \
14 file://0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch \
15 file://0001-libdnf-utils-sqlite3-Sqlite3.hpp-add-missing-cstdint.patch \
16 file://0001-libdnf-conf-OptionNumber.hpp-add-missing-cstdint-inc.patch \
14 " 17 "
15 18
16SRCREV = "add5d5418b140a86d08667dd2b14793093984875" 19SRCREV = "add5d5418b140a86d08667dd2b14793093984875"