From ed30cdfd8b6a9fc623680c0fcd22f5939f2e3cd5 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sat, 27 Dec 2025 22:35:37 +0800 Subject: [PATCH] ace-of-penguins: fix build with gcc 15 --- .../ac/ace-of-penguins/fix-gcc-15.patch | 22 +++++++++++++++++++ pkgs/by-name/ac/ace-of-penguins/package.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/by-name/ac/ace-of-penguins/fix-gcc-15.patch diff --git a/pkgs/by-name/ac/ace-of-penguins/fix-gcc-15.patch b/pkgs/by-name/ac/ace-of-penguins/fix-gcc-15.patch new file mode 100644 index 000000000000..503d1bf44f39 --- /dev/null +++ b/pkgs/by-name/ac/ace-of-penguins/fix-gcc-15.patch @@ -0,0 +1,22 @@ +diff --git a/lib/table.c b/lib/table.c +index befe696..cc08415 100644 +--- a/lib/table.c ++++ b/lib/table.c +@@ -297,10 +297,11 @@ check_dclick(int x, int y, int t) + } + + int help_is_showing = 0; +-static void help_nothing() { help_is_showing = 0; } ++static void help_nothing(void) { help_is_showing = 0; } ++static void help_nothing_args(int a, int b, int c) { help_is_showing = 0; } + void (*help_redraw)(void) = help_nothing; +-void (*help_click)(int x, int y, int b) = help_nothing; +-void (*help_key)(int c, int x, int y) = help_nothing; ++void (*help_click)(int x, int y, int b) = help_nothing_args; ++void (*help_key)(int c, int x, int y) = help_nothing_args; + + static int no_resize = 0; + void +-- +2.51.2 + diff --git a/pkgs/by-name/ac/ace-of-penguins/package.nix b/pkgs/by-name/ac/ace-of-penguins/package.nix index 86dc3fa99891..28ec3c649014 100644 --- a/pkgs/by-name/ac/ace-of-penguins/package.nix +++ b/pkgs/by-name/ac/ace-of-penguins/package.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation (finalAttrs: { # make-imglib.c:205:5: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] # imagelib.c:109:17: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] ./fix-gcc-14.patch + # error: initialization of 'void (*)(int, int, int)' from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] + ./fix-gcc-15.patch ]; nativeBuildInputs = [