From 2f6387d8b0bca6832712ee90c3aad734a90305cd Mon Sep 17 00:00:00 2001 From: Harinn Date: Wed, 6 May 2026 15:58:23 +0700 Subject: [PATCH] rtl_fm_streamer: fix build with gcc 15 --- pkgs/by-name/rt/rtl_fm_streamer/package.nix | 4 ++++ .../rt/rtl_fm_streamer/use-stdbool.patch | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/by-name/rt/rtl_fm_streamer/use-stdbool.patch diff --git a/pkgs/by-name/rt/rtl_fm_streamer/package.nix b/pkgs/by-name/rt/rtl_fm_streamer/package.nix index 435744ea7666..777e927c92e5 100644 --- a/pkgs/by-name/rt/rtl_fm_streamer/package.nix +++ b/pkgs/by-name/rt/rtl_fm_streamer/package.nix @@ -30,6 +30,10 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "cmake_minimum_required(VERSION 2.6)" "cmake_minimum_required(VERSION 3.10)" ''; + patches = [ + ./use-stdbool.patch + ]; + nativeBuildInputs = [ cmake pkg-config diff --git a/pkgs/by-name/rt/rtl_fm_streamer/use-stdbool.patch b/pkgs/by-name/rt/rtl_fm_streamer/use-stdbool.patch new file mode 100644 index 000000000000..4e5dd2b70180 --- /dev/null +++ b/pkgs/by-name/rt/rtl_fm_streamer/use-stdbool.patch @@ -0,0 +1,18 @@ +Drop the hand-rolled bool enum: `bool`, `true`, and `false` are reserved +keywords in C23 (the default since GCC 15), so the typedef no longer compiles. + +--- a/src/rtl_fm_streamer.c ++++ b/src/rtl_fm_streamer.c +@@ -100,11 +100,7 @@ + + #define DEFAULT_PORT_NUMBER "2346" + +-typedef enum +-{ +- false = 0, +- true +-}bool; ++#include + + struct dongle_state + {