From be63e8be905ce2156a252b1500543b1583b93a72 Mon Sep 17 00:00:00 2001 From: wilfried Date: Tue, 1 Jul 2008 08:27:52 +0000 Subject: [PATCH] include prototypes for malloc and realloc - fix 64-bit warnings --- x11/asfiles/Makefile | 4 ++-- x11/asfiles/patches/patch-src_Comms_c | 34 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 x11/asfiles/patches/patch-src_Comms_c diff --git a/x11/asfiles/Makefile b/x11/asfiles/Makefile index 1477dd39ddf..66e5237c323 100644 --- a/x11/asfiles/Makefile +++ b/x11/asfiles/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.10 2007/09/15 20:04:19 merdely Exp $ +# $OpenBSD: Makefile,v 1.11 2008/07/01 08:27:52 wilfried Exp $ COMMENT= X11 file manager. Dockable in Window Maker DISTNAME= ASFiles-1.0 -PKGNAME= ${DISTNAME:L} +PKGNAME= ${DISTNAME:L}p0 CATEGORIES= x11 x11/windowmaker MAINTAINER= Peter Stromberg diff --git a/x11/asfiles/patches/patch-src_Comms_c b/x11/asfiles/patches/patch-src_Comms_c new file mode 100644 index 00000000000..1d1d767637b --- /dev/null +++ b/x11/asfiles/patches/patch-src_Comms_c @@ -0,0 +1,34 @@ +$OpenBSD: patch-src_Comms_c,v 1.1 2008/07/01 08:27:52 wilfried Exp $ +--- src/Comms.c.orig Fri Jan 3 13:16:06 1997 ++++ src/Comms.c Mon Jun 30 17:05:56 2008 +@@ -10,6 +10,7 @@ + #include + #include + ++#include + #include "Files.h" + #include "Comms.h" + +@@ -90,11 +91,11 @@ void openRemoteDirs(Display *dpy, Window files, int ar + } + /* get working dir */ + bufsize = MAXPATHLEN; +- if (!(buf = (char*)malloc(bufsize))) exit(1); ++ if (!(buf = malloc(bufsize))) exit(1); + while(!getcwd(buf, bufsize)) + { + bufsize += MAXPATHLEN; +- if (!(buf = (char*)realloc(buf, bufsize))) exit(1); ++ if (!(buf = realloc(buf, bufsize))) exit(1); + } + strcat(buf, "/"); + s = buf+strlen(buf); +@@ -106,7 +107,7 @@ void openRemoteDirs(Display *dpy, Window files, int ar + if (bufsize>strlen(buf)+strlen(*argv)) + strcat(buf, *argv++); + else +- if (!(buf = (char*)realloc(buf,strlen(buf)+strlen(*argv)+1))) ++ if (!(buf = realloc(buf,strlen(buf)+strlen(*argv)+1))) + exit(1); + else + strcat(buf, *argv++);