From 00629168415dcbcbf31009687d248f3579fcfae7 Mon Sep 17 00:00:00 2001 From: Xiangyan Sun Date: Thu, 9 Apr 2026 21:20:50 -0700 Subject: [PATCH] boxfs: fix build with gcc15 --- pkgs/by-name/bo/boxfs/package.nix | 1 + pkgs/by-name/bo/boxfs/use-stdbool.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/by-name/bo/boxfs/use-stdbool.patch diff --git a/pkgs/by-name/bo/boxfs/package.nix b/pkgs/by-name/bo/boxfs/package.nix index cd5b2af099b6..2d9ca8313878 100644 --- a/pkgs/by-name/bo/boxfs/package.nix +++ b/pkgs/by-name/bo/boxfs/package.nix @@ -44,6 +44,7 @@ stdenv.mkDerivation { patches = [ ./work-around-API-borkage.patch ./libapp-include-ctype.diff + ./use-stdbool.patch ]; buildInputs = [ diff --git a/pkgs/by-name/bo/boxfs/use-stdbool.patch b/pkgs/by-name/bo/boxfs/use-stdbool.patch new file mode 100644 index 000000000000..9177886eadc3 --- /dev/null +++ b/pkgs/by-name/bo/boxfs/use-stdbool.patch @@ -0,0 +1,18 @@ +diff --git a/tmp/orig_base.h b/libapp/libapp/base.h +index 7d8abdb..2f42b03 100644 +--- a/tmp/orig_base.h ++++ b/libapp/libapp/base.h +@@ -1,12 +1,7 @@ + #ifndef APP_BASE_H + #define APP_BASE_H + +-#ifndef __cplusplus +-typedef enum { +- false = 0, +- true = 1 +-} bool; +-#endif ++#include + + #define ASSERT(clause) if( !clause) { fprintf(stderr, "Assertion '%s' failed at %s:%d\n", #clause, __FILE__, __LINE__ ); exit(-1); } +