diff mbox series

[1/1] package/f2fs-tools: fix GCC 15 build

Message ID 20250512120307.10341-2-fl@n621.de
State Accepted
Delegated to: Julien Olivain
Headers show
Series [1/1] package/f2fs-tools: fix GCC 15 build | expand

Commit Message

Florian Larysch May 12, 2025, 12:02 p.m. UTC
f2fs-tools had its own "bool" typedef which now conflicts with the C23
keyword, causing build failures on GCC 15.

Import a patch from upstream that fixes this.

Fixes: https://autobuild.buildroot.org/results/d17641582d1beaec9dcca4dc48a68d713cecfdc8 (and others)
Signed-off-by: Florian Larysch <fl@n621.de>
---
 ...-tools-use-stdbool.h-instead-of-bool.patch | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch

Comments

Julien Olivain May 12, 2025, 8:09 p.m. UTC | #1
On 12/05/2025 14:02, Florian Larysch wrote:
> f2fs-tools had its own "bool" typedef which now conflicts with the C23
> keyword, causing build failures on GCC 15.
> 
> Import a patch from upstream that fixes this.
> 
> Fixes: 
> https://autobuild.buildroot.org/results/d17641582d1beaec9dcca4dc48a68d713cecfdc8 
> (and others)
> Signed-off-by: Florian Larysch <fl@n621.de>

Applied to master, thanks.
Arnout Vandecappelle May 18, 2025, 2:38 p.m. UTC | #2
On 12/05/2025 14:02, Florian Larysch wrote:
> f2fs-tools had its own "bool" typedef which now conflicts with the C23
> keyword, causing build failures on GCC 15.
> 
> Import a patch from upstream that fixes this.
> 
> Fixes: https://autobuild.buildroot.org/results/d17641582d1beaec9dcca4dc48a68d713cecfdc8 (and others)
> Signed-off-by: Florian Larysch <fl@n621.de>

  Applied to 2025.02.x, thanks.

  Regards,
  Arnout

> ---
>   ...-tools-use-stdbool.h-instead-of-bool.patch | 41 +++++++++++++++++++
>   1 file changed, 41 insertions(+)
>   create mode 100644 package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch
> 
> diff --git a/package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch b/package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch
> new file mode 100644
> index 0000000000..90dfdc209a
> --- /dev/null
> +++ b/package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch
> @@ -0,0 +1,41 @@
> +From ec0f9d07792298f89e71cee1e692ad60bf6b8d5c Mon Sep 17 00:00:00 2001
> +From: Jaegeuk Kim <jaegeuk@kernel.org>
> +Date: Thu, 24 Oct 2024 20:33:38 +0000
> +Subject: [PATCH] f2fs-tools: use stdbool.h instead of bool
> +
> +The existing bool definition is broken for c23, where bool is now a keyword.
> +
> +Signed-off-by: Elliott Hughes <enh@google.com>
> +Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> +Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=6617d15a660becc23825007ab3fc2d270b5b250f
> +[Florian: rebased to 1.16.0]
> +Signed-off-by: Florian Larysch <fl@n621.de>
> +---
> + include/f2fs_fs.h | 4 +---
> + 1 file changed, 1 insertion(+), 3 deletions(-)
> +
> +diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
> +index f890634..a968380 100644
> +--- a/include/f2fs_fs.h
> ++++ b/include/f2fs_fs.h
> +@@ -26,6 +26,7 @@
> + #include <stddef.h>
> + #include <string.h>
> + #include <time.h>
> ++#include <stdbool.h>
> +
> + #ifdef HAVE_CONFIG_H
> + #include <config.h>
> +@@ -103,9 +104,6 @@ typedef uint16_t	u16;
> + typedef uint8_t		u8;
> + typedef u32		block_t;
> + typedef u32		nid_t;
> +-#ifndef bool
> +-typedef u8		bool;
> +-#endif
> + typedef unsigned long	pgoff_t;
> + typedef unsigned short	umode_t;
> +
> +--
> +2.49.0
> +
diff mbox series

Patch

diff --git a/package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch b/package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch
new file mode 100644
index 0000000000..90dfdc209a
--- /dev/null
+++ b/package/f2fs-tools/0002-f2fs-tools-use-stdbool.h-instead-of-bool.patch
@@ -0,0 +1,41 @@ 
+From ec0f9d07792298f89e71cee1e692ad60bf6b8d5c Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+Date: Thu, 24 Oct 2024 20:33:38 +0000
+Subject: [PATCH] f2fs-tools: use stdbool.h instead of bool
+
+The existing bool definition is broken for c23, where bool is now a keyword.
+
+Signed-off-by: Elliott Hughes <enh@google.com>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?id=6617d15a660becc23825007ab3fc2d270b5b250f
+[Florian: rebased to 1.16.0]
+Signed-off-by: Florian Larysch <fl@n621.de>
+---
+ include/f2fs_fs.h | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
+index f890634..a968380 100644
+--- a/include/f2fs_fs.h
++++ b/include/f2fs_fs.h
+@@ -26,6 +26,7 @@
+ #include <stddef.h>
+ #include <string.h>
+ #include <time.h>
++#include <stdbool.h>
+ 
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+@@ -103,9 +104,6 @@ typedef uint16_t	u16;
+ typedef uint8_t		u8;
+ typedef u32		block_t;
+ typedef u32		nid_t;
+-#ifndef bool
+-typedef u8		bool;
+-#endif
+ typedef unsigned long	pgoff_t;
+ typedef unsigned short	umode_t;
+ 
+-- 
+2.49.0
+