sasquatch: fix build for gcc 15

GCC 15 defaults to C23, so the interpretation of a function with an
empty parameter list becomes that it has no parameters instead of
ambiguous. Thus, we include a patch to add missing parameters to
function definitions.
This commit is contained in:
whispers
2025-12-21 01:20:52 -05:00
parent 292c595005
commit 8ff4c75b73
2 changed files with 28 additions and 1 deletions
@@ -0,0 +1,22 @@
diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
index ed5096b32d..adb6a91c7e 100644
--- a/squashfs-tools/unsquashfs.c
+++ b/squashfs-tools/unsquashfs.c
@@ -146,7 +146,7 @@
#define MAX_LINE 16384
-void sigwinch_handler()
+void sigwinch_handler(int _signal)
{
struct winsize winsize;
@@ -160,7 +160,7 @@
}
-void sigalrm_handler()
+void sigalrm_handler(int _signal)
{
rotate = (rotate + 1) % 4;
}
+6 -1
View File
@@ -23,7 +23,12 @@ let
hash = "sha256-4Mltt0yFt4oh9hsrHL8/ch5n7nZYiXIJ1UgLktPvlKQ=";
};
patches = lib.optional stdenv.hostPlatform.isDarwin ./darwin.patch;
patches = [
# Fix build for GCC 15/C23 by adding parameters to unsquashfs signal
# handlers instead of relying on an empty parameter list.
./gcc15-fix-prototypes.patch
]
++ lib.optional stdenv.hostPlatform.isDarwin ./darwin.patch;
strictDeps = true;
nativeBuildInputs = [ which ];