Message ID | 20250507231810.2027418-1-denis@denix.org |
---|---|
State | New |
Headers | show |
Series | [master/scarthgap] omapconf: use proper definition of boolean type | expand |
On 5/7/25 6:18 PM, Denys Dmytriyenko wrote: > From: Denys Dmytriyenko <denys@konsulko.com> > > Newer versions of GCC and C standard have bool as a built-in > keyword - use a standard stdbool.h header to properly handle it. > > Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> > --- > ...se-proper-definition-of-boolean-type.patch | 41 +++++++++++++++++++ > .../recipes-devtools/omapconf/omapconf_git.bb | 2 + > 2 files changed, 43 insertions(+) > create mode 100644 meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch > > diff --git a/meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch b/meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch > new file mode 100644 > index 00000000..e1a29c9c > --- /dev/null > +++ b/meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch > @@ -0,0 +1,41 @@ > +From c52280d923c167032a84f1c67574eb340e38572c Mon Sep 17 00:00:00 2001 > +From: Denys Dmytriyenko <denys@konsulko.com> > +Date: Wed, 7 May 2025 17:03:20 -0400 > +Subject: [PATCH] Use proper definition of boolean type > + > +Newer versions of GCC and C standard have bool as a built-in > +keyword - use a standard stdbool.h header to properly handle it. > + > +Upstream-Status: Inactive-Upstream Are you sure? I bet +Nishanth would take this patch if you made the PR. Andrew > + > +Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> > +--- > + arch/arm/mach-omap/common/statcoll/sci.h | 8 +------- > + 1 file changed, 1 insertion(+), 7 deletions(-) > + > +diff --git a/arch/arm/mach-omap/common/statcoll/sci.h b/arch/arm/mach-omap/common/statcoll/sci.h > +index 4134c00..1a393b4 100644 > +--- a/arch/arm/mach-omap/common/statcoll/sci.h > ++++ b/arch/arm/mach-omap/common/statcoll/sci.h > +@@ -48,17 +48,11 @@ > + #ifndef SCI_H > + #define SCI_H > + > ++#include <stdbool.h> > + #include <stdlib.h> > + #include <stdint.h> // The library uses C99 exact-width integer types > + #include "sci_dev.h" > + > +-#if !defined(__bool_true_false_are_defined) && !defined(_STM_Logging) > +-typedef enum { > +- false = 0, > +- true = 1 > +-} bool; > +-#endif > +- > + #ifdef _STM_Logging > + #include "StmLibrary.h" > + #endif > +-- > +2.25.1 > + > diff --git a/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb b/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb > index 175c6771..dad8ece0 100644 > --- a/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb > +++ b/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb > @@ -13,6 +13,8 @@ SRCREV = "ff07b6992bacb1e1586c72b7d2be469caee4a347" > > SRC_URI = "git://github.com/omapconf/omapconf.git;protocol=https;branch=${BRANCH}" > > +SRC_URI += "file://0001-Use-proper-definition-of-boolean-type.patch" > + > S = "${WORKDIR}/git" > > do_compile () {
diff --git a/meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch b/meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch new file mode 100644 index 00000000..e1a29c9c --- /dev/null +++ b/meta-arago-test/recipes-devtools/omapconf/files/0001-Use-proper-definition-of-boolean-type.patch @@ -0,0 +1,41 @@ +From c52280d923c167032a84f1c67574eb340e38572c Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <denys@konsulko.com> +Date: Wed, 7 May 2025 17:03:20 -0400 +Subject: [PATCH] Use proper definition of boolean type + +Newer versions of GCC and C standard have bool as a built-in +keyword - use a standard stdbool.h header to properly handle it. + +Upstream-Status: Inactive-Upstream + +Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> +--- + arch/arm/mach-omap/common/statcoll/sci.h | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/arch/arm/mach-omap/common/statcoll/sci.h b/arch/arm/mach-omap/common/statcoll/sci.h +index 4134c00..1a393b4 100644 +--- a/arch/arm/mach-omap/common/statcoll/sci.h ++++ b/arch/arm/mach-omap/common/statcoll/sci.h +@@ -48,17 +48,11 @@ + #ifndef SCI_H + #define SCI_H + ++#include <stdbool.h> + #include <stdlib.h> + #include <stdint.h> // The library uses C99 exact-width integer types + #include "sci_dev.h" + +-#if !defined(__bool_true_false_are_defined) && !defined(_STM_Logging) +-typedef enum { +- false = 0, +- true = 1 +-} bool; +-#endif +- + #ifdef _STM_Logging + #include "StmLibrary.h" + #endif +-- +2.25.1 + diff --git a/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb b/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb index 175c6771..dad8ece0 100644 --- a/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb +++ b/meta-arago-test/recipes-devtools/omapconf/omapconf_git.bb @@ -13,6 +13,8 @@ SRCREV = "ff07b6992bacb1e1586c72b7d2be469caee4a347" SRC_URI = "git://github.com/omapconf/omapconf.git;protocol=https;branch=${BRANCH}" +SRC_URI += "file://0001-Use-proper-definition-of-boolean-type.patch" + S = "${WORKDIR}/git" do_compile () {