diff mbox series

[kirkstone] libdnf: resolve cstdint inclusion for newer gcc versions

Message ID 20230827221021.1349269-1-abe.kohandel@gmail.com
State New, archived
Headers show
Series [kirkstone] libdnf: resolve cstdint inclusion for newer gcc versions | expand

Commit Message

Abe Kohandel Aug. 27, 2023, 10:10 p.m. UTC
Depending on the host gcc version, libdnf fails to compile due to
missing cstdint inclusion. The issue has already been addressed
upstream, add the patch to resolve this for older versions of the
library.

This commit is taken directly from the libdnf project at
https://github.com/rpm-software-management/libdnf

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
---
 ...58-Don-t-assume-inclusion-of-cstdint.patch | 56 +++++++++++++++++++
 meta/recipes-devtools/libdnf/libdnf_0.66.0.bb |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch

Comments

Khem Raj Aug. 27, 2023, 10:42 p.m. UTC | #1
On Sun, Aug 27, 2023 at 3:12 PM Abe Kohandel <abe.kohandel@gmail.com> wrote:

> Depending on the host gcc version, libdnf fails to compile due to
> missing cstdint inclusion. The issue has already been addressed
> upstream, add the patch to resolve this for older versions of the
> library.
>
> This commit is taken directly from the libdnf project at
> https://github.com/rpm-software-management/libdnf
>
> Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
> ---
>  ...58-Don-t-assume-inclusion-of-cstdint.patch | 56 +++++++++++++++++++
>  meta/recipes-devtools/libdnf/libdnf_0.66.0.bb |  1 +
>  2 files changed, 57 insertions(+)
>  create mode 100644
> meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
>
> 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..51fa141f79
> --- /dev/null
> +++
> b/meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
> @@ -0,0 +1,56 @@
> +From 779ea105564b6d717300af2fcb02a399737a536f Mon Sep 17 00:00:00 2001
> +From: ctxnop <ctxnop@gmail.com>
> +Date: Mon, 15 May 2023 19:30:16 +0200
> +Subject: [PATCH] Fix #1558: Don't assume inclusion of cstdint
> +
> +With last versions of gcc, some headers don't include cstdint anymore,
> +but some sources assume that it is.
> +
> +Upstream-Status: Submitted [
> https://github.com/rpm-software-management/libdnf/pull/1602]


This pull is already merged at this time so status should be marked
Backport


> +Signed-off-by: ctxnop <ctxnop@gmail.com>
> +---
> + libdnf/conf/ConfigMain.hpp    | 1 +
> + libdnf/conf/ConfigRepo.hpp    | 1 +
> + libdnf/conf/OptionSeconds.hpp | 2 ++
> + 3 files changed, 4 insertions(+)
> +
> +diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp
> +index 19395c71..59f65c48 100644
> +--- a/libdnf/conf/ConfigMain.hpp
> ++++ b/libdnf/conf/ConfigMain.hpp
> +@@ -32,6 +32,7 @@
> + #include "OptionString.hpp"
> + #include "OptionStringList.hpp"
> +
> ++#include <cstdint>
> + #include <memory>
> +
> + namespace libdnf {
> +diff --git a/libdnf/conf/ConfigRepo.hpp b/libdnf/conf/ConfigRepo.hpp
> +index 2b198441..84cafbad 100644
> +--- a/libdnf/conf/ConfigRepo.hpp
> ++++ b/libdnf/conf/ConfigRepo.hpp
> +@@ -26,6 +26,7 @@
> + #include "ConfigMain.hpp"
> + #include "OptionChild.hpp"
> +
> ++#include <cstdint>
> + #include <memory>
> +
> + namespace libdnf {
> +diff --git a/libdnf/conf/OptionSeconds.hpp b/libdnf/conf/OptionSeconds.hpp
> +index dc714b23..a80a973f 100644
> +--- a/libdnf/conf/OptionSeconds.hpp
> ++++ b/libdnf/conf/OptionSeconds.hpp
> +@@ -25,6 +25,8 @@
> +
> + #include "OptionNumber.hpp"
> +
> ++#include <cstdint>
> ++
> + namespace libdnf {
> +
> + /**
> +--
> +2.42.0
> +
> diff --git a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
> b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
> index 2558f96851..9ed4108777 100644
> --- a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
> +++ b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
> @@ -11,6 +11,7 @@ SRC_URI = "git://
> github.com/rpm-software-management/libdnf;branch=dnf-4-master;p
>             file://enable_test_data_dir_set.patch \
>             file://0001-drop-FindPythonInstDir.cmake.patch \
>
> file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \
> +           file://0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch \
>             "
>
>  SRCREV = "add5d5418b140a86d08667dd2b14793093984875"
> --
> 2.42.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#186808):
> https://lists.openembedded.org/g/openembedded-core/message/186808
> Mute This Topic: https://lists.openembedded.org/mt/100999045/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Abe Kohandel Aug. 28, 2023, 12:26 a.m. UTC | #2
On 23/08/27 03:42PM, Khem Raj wrote:
> On Sun, Aug 27, 2023 at 3:12 PM Abe Kohandel <abe.kohandel@gmail.com> wrote:
> 
> > Depending on the host gcc version, libdnf fails to compile due to
> > missing cstdint inclusion. The issue has already been addressed
> > upstream, add the patch to resolve this for older versions of the
> > library.
> >
> > This commit is taken directly from the libdnf project at
> > https://github.com/rpm-software-management/libdnf
> >
> > Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
> > ---
> >  ...58-Don-t-assume-inclusion-of-cstdint.patch | 56 +++++++++++++++++++
> >  meta/recipes-devtools/libdnf/libdnf_0.66.0.bb |  1 +
> >  2 files changed, 57 insertions(+)
> >  create mode 100644
> > meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
> >
> > 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..51fa141f79
> > --- /dev/null
> > +++
> > b/meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
> > @@ -0,0 +1,56 @@
> > +From 779ea105564b6d717300af2fcb02a399737a536f Mon Sep 17 00:00:00 2001
> > +From: ctxnop <ctxnop@gmail.com>
> > +Date: Mon, 15 May 2023 19:30:16 +0200
> > +Subject: [PATCH] Fix #1558: Don't assume inclusion of cstdint
> > +
> > +With last versions of gcc, some headers don't include cstdint anymore,
> > +but some sources assume that it is.
> > +
> > +Upstream-Status: Submitted [
> > https://github.com/rpm-software-management/libdnf/pull/1602]
> 
> 
> This pull is already merged at this time so status should be marked
> Backport
> 

My apologies, this is my first submission to this project, v2 submitted at
https://lists.openembedded.org/g/openembedded-core/message/186810

Thanks,
Abe
diff mbox series

Patch

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..51fa141f79
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch
@@ -0,0 +1,56 @@ 
+From 779ea105564b6d717300af2fcb02a399737a536f Mon Sep 17 00:00:00 2001
+From: ctxnop <ctxnop@gmail.com>
+Date: Mon, 15 May 2023 19:30:16 +0200
+Subject: [PATCH] Fix #1558: Don't assume inclusion of cstdint
+
+With last versions of gcc, some headers don't include cstdint anymore,
+but some sources assume that it is.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/libdnf/pull/1602]
+Signed-off-by: ctxnop <ctxnop@gmail.com>
+---
+ libdnf/conf/ConfigMain.hpp    | 1 +
+ libdnf/conf/ConfigRepo.hpp    | 1 +
+ libdnf/conf/OptionSeconds.hpp | 2 ++
+ 3 files changed, 4 insertions(+)
+
+diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp
+index 19395c71..59f65c48 100644
+--- a/libdnf/conf/ConfigMain.hpp
++++ b/libdnf/conf/ConfigMain.hpp
+@@ -32,6 +32,7 @@
+ #include "OptionString.hpp"
+ #include "OptionStringList.hpp"
+ 
++#include <cstdint>
+ #include <memory>
+ 
+ namespace libdnf {
+diff --git a/libdnf/conf/ConfigRepo.hpp b/libdnf/conf/ConfigRepo.hpp
+index 2b198441..84cafbad 100644
+--- a/libdnf/conf/ConfigRepo.hpp
++++ b/libdnf/conf/ConfigRepo.hpp
+@@ -26,6 +26,7 @@
+ #include "ConfigMain.hpp"
+ #include "OptionChild.hpp"
+ 
++#include <cstdint>
+ #include <memory>
+ 
+ namespace libdnf {
+diff --git a/libdnf/conf/OptionSeconds.hpp b/libdnf/conf/OptionSeconds.hpp
+index dc714b23..a80a973f 100644
+--- a/libdnf/conf/OptionSeconds.hpp
++++ b/libdnf/conf/OptionSeconds.hpp
+@@ -25,6 +25,8 @@
+ 
+ #include "OptionNumber.hpp"
+ 
++#include <cstdint>
++
+ namespace libdnf {
+ 
+ /**
+-- 
+2.42.0
+
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
index 2558f96851..9ed4108777 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.66.0.bb
@@ -11,6 +11,7 @@  SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;p
            file://enable_test_data_dir_set.patch \
            file://0001-drop-FindPythonInstDir.cmake.patch \
            file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \
+           file://0001-Fix-1558-Don-t-assume-inclusion-of-cstdint.patch \
            "
 
 SRCREV = "add5d5418b140a86d08667dd2b14793093984875"