biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / graphics / xcur2png / malloc.diff
blob88f4e8e17ba902d1c977985061a46ea4e3bba8a7
1 --- a/xcur2png.c
2 +++ b/xcur2png.c
3 @@ -16,7 +16,10 @@
4 /* Todo: atoi error handling */
5 /* help is -h in manual */
7 +#if HAVE_CONFIG_H
8 #include <config.h>
9 +#endif
10 +#undef malloc
12 #define _ATFILE_SOURCE
13 #include <stdio.h>
14 @@ -34,6 +37,19 @@
15 #include <png.h>
16 #include <X11/Xcursor/Xcursor.h>
19 +void *malloc ();
21 +/* Allocate an N-byte block of memory from the heap.
22 + If N is zero, allocate a 1-byte block. */
24 +void* rpl_malloc (size_t n)
26 + if (n == 0)
27 + n = 1;
28 + return malloc (n);
31 #define PNG_SETJMP_NOT_SUPPORTED 1
33 #define PROGRESS_SHARPS 50 /* total number of progress sharps */