[hobbit] 4.2-Alpha Make error

Henrik Stoerner henrik at hswn.dk
Wed Apr 5 14:31:03 CEST 2006


On Wed, Apr 05, 2006 at 11:06:25AM +0100, Morris, Chris (Shared Services) wrote:
> 
> Running on RedHat 7.1 with 2.4.3-6 Kernel, get the following error :-
> 
> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DLINUX -I.
> -I/usr/local/hobbit-4.2-alfa-20060404/include -I/usr/include/pcre -I.
> -I../include    -c -o strfunc.o strfunc.c
> strfunc.c: In function `grabstrbuffer':
> strfunc.c:76: parse error before `char'

OK, this happens with some older compilers only, I think. This patch
should fix it.

Henrik

-------------- next part --------------
--- lib/strfunc.c	2006/03/31 20:55:52	1.5
+++ lib/strfunc.c	2006/04/05 12:29:05
@@ -11,7 +11,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char rcsid[] = "$Id: strfunc.c,v 1.5 2006/03/31 20:55:52 henrik Exp $";
+static char rcsid[] = "$Id: strfunc.c,v 1.6 2006/04/05 12:28:57 henrik Exp $";
 
 #include "config.h"
 
@@ -71,9 +71,11 @@
 
 char *grabstrbuffer(strbuffer_t *buf)
 {
+	char *result;
+
 	if (buf == NULL) return NULL;
 
-	char *result = buf->s;
+	result = buf->s;
 	xfree(buf);
 
 	return result;


More information about the Xymon mailing list