Package: dbench Version: 3.03-1 Severity: normal Tags: patch When building 'dbench' on amd64/unstable with gcc-4.0, I get the following error:
x86_64-linux-gcc -Wall -g -O2 -Wall -W -I. -DVERSION=\"3.03\" -DDATADIR=\"/usr/share/dbench\" -c -o snprintf.o snprintf.c snprintf.c: In function 'dopr': snprintf.c:175: error: incompatible types in assignment make[1]: *** [snprintf.o] Error 1 make[1]: Leaving directory `/dbench-3.03' make: *** [build-stamp] Error 2 With the attached patch 'dbench' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/dbench-3.03/snprintf.c ./snprintf.c --- ../tmp-orig/dbench-3.03/snprintf.c 2004-12-13 03:26:32.000000000 +0100 +++ ./snprintf.c 2005-06-22 07:32:44.000000000 +0200 @@ -81,15 +81,6 @@ #include <stdlib.h> #endif -#ifndef VA_COPY -#ifdef HAVE_VA_COPY -#define VA_COPY(dest, src) __va_copy(dest, src) -#else -#define VA_COPY(dest, src) (dest) = (src) -#endif -#endif - - #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ #include <stdio.h> @@ -172,7 +163,7 @@ size_t currlen; va_list args; - VA_COPY(args, args_in); + va_copy(args, args_in); state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; @@ -809,7 +800,7 @@ int ret; va_list ap2; - VA_COPY(ap2, ap); + va_copy(ap2, ap); ret = vsnprintf(NULL, 0, format, ap2); if (ret <= 0) return ret; @@ -817,7 +808,7 @@ (*ptr) = (char *)malloc(ret+1); if (!*ptr) return -1; - VA_COPY(ap2, ap); + va_copy(ap2, ap); ret = vsnprintf(*ptr, ret+1, format, ap2); diff -urN ../tmp-orig/dbench-3.03/tbench_srv.c ./tbench_srv.c --- ../tmp-orig/dbench-3.03/tbench_srv.c 2004-12-13 03:47:59.000000000 +0100 +++ ./tbench_srv.c 2005-06-22 07:30:29.000000000 +0200 @@ -64,7 +64,7 @@ while (1) { struct sockaddr addr; - int in_addrlen = sizeof(addr); + socklen_t in_addrlen = sizeof(addr); int fd; while (waitpid((pid_t)-1,(int *)NULL, WNOHANG) > 0) ; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]