From 8b0d7a31ad39a864692a6a55f6c6daa551917b6c Mon Sep 17 00:00:00 2001 From: ghpzin Date: Mon, 1 Dec 2025 01:49:07 +0300 Subject: [PATCH] xcur2png: fix build with gcc15 - change `malloc` declaration in `malloc.diff` patch from `void *malloc()` to `void *malloc(size_t __size)` PR for that patch is still unmerged upstream: https://www.github.com/eworm-de/xcur2png/pull/3 Fixes build failure with gcc15: ``` xcur2png.c:41:7: error: conflicting types for 'malloc'; have 'void *(void)' 41 | void *malloc (); | ^~~~~~ In file included from xcur2png.c:26: /nix/store/i1qha7him4faq593wwl1zmhg2pc6lz98-glibc-2.40-66-dev/include/stdlib.h:672:14: note: previous declaration of 'malloc' with type 'void *(long unsigned int)' 672 | extern void *malloc (size_t __size) __THROW __attribute_malloc__ | ^~~~~~ xcur2png.c: In function 'rpl_malloc': xcur2png.c:50:10: error: too many arguments to function 'malloc'; expected 0, have 1 50 | return malloc (n); | ^~~~~~ ~ xcur2png.c:41:7: note: declared here 41 | void *malloc (); | ^~~~~~ xcur2png.c: In function 'makeConfPath': xcur2png.c:246:11: error: too many arguments to function 'malloc'; expected 0, have 1 246 | ret = malloc ((strlen (rawname) + 6) * sizeof (char)); /* rawname + ".conf\0" */ | ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- pkgs/by-name/xc/xcur2png/malloc.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/xc/xcur2png/malloc.diff b/pkgs/by-name/xc/xcur2png/malloc.diff index 88f4e8e17ba9..d069db6a5297 100644 --- a/pkgs/by-name/xc/xcur2png/malloc.diff +++ b/pkgs/by-name/xc/xcur2png/malloc.diff @@ -16,7 +16,7 @@ #include + -+void *malloc (); ++void *malloc (size_t __size); + +/* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */