This patch was sent to me by Andrew Dalgleish. It seems to be fine on my
system. It fixes a SIGSEGV that Andrew noticed when passing long command
lines to ccache.
If someone could commit this, I'd appreciate it.
--ben
Index: devel/ccache/Makefile
===================================================================
RCS file: /cvs/ports/devel/ccache/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- devel/ccache/Makefile 31 May 2005 18:47:12 -0000 1.9
+++ devel/ccache/Makefile 23 Jan 2006 03:15:49 -0000
@@ -3,6 +3,7 @@
COMMENT= "compiler cache"
DISTNAME= ccache-2.4
+PKGNAME= ${DISTNAME}p0
CATEGORIES= devel
HOMEPAGE= http://ccache.samba.org/
Index: devel/ccache/patches/patch-util_c
===================================================================
RCS file: devel/ccache/patches/patch-util_c
diff -N devel/ccache/patches/patch-util_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/ccache/patches/patch-util_c 23 Jan 2006 03:15:49 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+--- util.c.orig Sun Jan 22 17:16:46 2006
++++ util.c Sun Jan 22 17:17:15 2006
+@@ -187,13 +187,9 @@ void *x_realloc(void *ptr, size_t size)
+ {
+ void *p2;
+ if (!ptr) return x_malloc(size);
+- p2 = malloc(size);
++ p2 = realloc(ptr, size);
+ if (!p2) {
+ fatal("out of memory in x_realloc");
+- }
+- if (ptr) {
+- memcpy(p2, ptr, size);
+- free(ptr);
+ }
+ return p2;
+ }