From 32ec8b53f180a3866f5cd7d3d5beb180498fc018 Mon Sep 17 00:00:00 2001 From: Leona Maroni Date: Thu, 8 Jan 2026 13:32:48 +0100 Subject: [PATCH] pmacct: add patch for gcc15 compatability --- pkgs/by-name/pm/pmacct/gcc15-compat.patch | 56 +++++++++++++++++++++++ pkgs/by-name/pm/pmacct/package.nix | 9 ++++ 2 files changed, 65 insertions(+) create mode 100644 pkgs/by-name/pm/pmacct/gcc15-compat.patch diff --git a/pkgs/by-name/pm/pmacct/gcc15-compat.patch b/pkgs/by-name/pm/pmacct/gcc15-compat.patch new file mode 100644 index 000000000000..ea3d0d0aa1f2 --- /dev/null +++ b/pkgs/by-name/pm/pmacct/gcc15-compat.patch @@ -0,0 +1,56 @@ +From 6466578967d3d39c46f7ec10b308bca36568697d Mon Sep 17 00:00:00 2001 +From: Paolo Lucente +Date: Tue, 11 Mar 2025 23:02:05 +0000 +Subject: [PATCH] * fix, making gcc15 happy. Patch contributed by Petr Gajdos + +--- + +diff --git a/src/pmacct.h b/src/pmacct.h +index ab7b3bba5..121141a28 100644 +--- a/src/pmacct.h ++++ b/src/pmacct.h +@@ -368,9 +368,9 @@ struct child_ctl2 { + #include "util.h" + + /* prototypes */ +-void startup_handle_falling_child(); +-void handle_falling_child(); +-void ignore_falling_child(); ++void startup_handle_falling_child(int); ++void handle_falling_child(int); ++void ignore_falling_child(int); + void PM_sigint_handler(int); + void PM_sigalrm_noop_handler(int); + void reload(int); +diff --git a/src/signals.c b/src/signals.c +index 94fdbd12e..ad9a627e1 100644 +--- a/src/signals.c ++++ b/src/signals.c +@@ -29,7 +29,7 @@ + extern struct plugins_list_entry *plugin_list; + + /* functions */ +-void startup_handle_falling_child() ++void startup_handle_falling_child(int unused) + { + int i, j; + +@@ -42,7 +42,7 @@ void startup_handle_falling_child() + } + } + +-void handle_falling_child() ++void handle_falling_child(int unused) + { + struct plugins_list_entry *list = NULL; + int j, ret; +@@ -100,7 +100,7 @@ void handle_falling_child() + } + } + +-void ignore_falling_child() ++void ignore_falling_child(int unused) + { + pid_t cpid; + int status; + diff --git a/pkgs/by-name/pm/pmacct/package.nix b/pkgs/by-name/pm/pmacct/package.nix index 97f9a078c631..491735246210 100644 --- a/pkgs/by-name/pm/pmacct/package.nix +++ b/pkgs/by-name/pm/pmacct/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, pkg-config, autoreconfHook, libtool, @@ -38,6 +39,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-3gV6GUhTQnH09NRIJQI0xBn05Bgo3AJsE2cSxNPXITo="; }; + patches = [ + # Fixes GCC15 compatability + # Can be removed with the next release + # Custom version of https://github.com/pmacct/pmacct/commit/6466578967d3d39c46f7ec10b308bca36568697d.patch + # without the copyright date changes. + ./gcc15-compat.patch + ]; + nativeBuildInputs = [ autoreconfHook pkg-config