switch-config: use proper definition of boolean type
PATCH 1/1 switch-config: use proper definition of boolean type
From: Denys Dmytriyenko <[email protected]>
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 <[email protected]>
--- ...se-proper-definition-of-boolean-type.patch | 34 +++++++++++++++++++ .../switch-config/switch-config_git.bb | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 meta-arago-test/recipes-bsp/switch-config/files/0001-Use-proper-definition-of-boolean-type.patch
meta-arago-test/recipes-bsp/switch-config/files/0001-Use-proper-definition-of-boolean-type.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 5190913c7a86cd36b91dc3a6ff4c1eb22ea6375e Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <[email protected]> +Date: Tue, 6 May 2025 12:52:14 -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 <[email protected]> +--- + switch-config.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/switch-config.c b/switch-config.c +index d31a237..5b5db3a 100644 +--- a/switch-config.c ++++ b/switch-config.c +@@ -13,10 +13,7 @@ + * GNU General Public License for more details. + */ + +-#define true 1 +-#define false 0 +-typedef int bool; +- ++#include <stdbool.h> + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +-- +2.25.1 +
meta-arago-test/recipes-bsp/switch-config/switch-config_git.bb +2 -0
@@ -13,6 +13,8 @@ SRCREV:aarch64 = "0f52dcb3c4e3678e96427d546d6c2e1fabc2ad91" SRC_URI = "git://git.ti.com/git/switch-config/switch-config.git;protocol=https;branch=${BRANCH}" +SRC_URI += "file://0001-Use-proper-definition-of-boolean-type.patch" + S = "${WORKDIR}/git" EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}""
Signature · 1 line
2.25.1