diff options
Diffstat (limited to 'sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch')
-rw-r--r-- | sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch new file mode 100644 index 00000000000..dd10d4a2c3c --- /dev/null +++ b/sci-astronomy/sextractor/files/sextractor-2.19.5-have-malloc.patch @@ -0,0 +1,32 @@ +Author: Justin Pryzby <justinpryzby@users.sf.net> +Description: (guess) Define rpl_malloc if not there. +--- a/src/misc.c ++++ b/src/misc.c +@@ -34,6 +34,8 @@ + #include <time.h> + #include <sys/time.h> + ++#include <sys/types.h> ++ + #include "define.h" + #include "globals.h" + +@@ -153,3 +155,18 @@ + } + + ++#if !HAVE_MALLOC ++#undef malloc ++ ++// Allocate an N-byte block of memory from the heap. If N is zero, ++// allocate a 1-byte block. ++void *rpl_malloc(size_t n) ++{ ++ void *malloc(); ++ if (0==n) { ++ n = 1; ++ } ++ ++ return malloc(n); ++} ++#endif |