Date: Tue, 04 May 2004 14:27:25 +0300 From: Andrey Slusar <vasallia@ukr.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/66250: [PATCH] databases/msql: fix compiling whith gcc >= 3.3 Message-ID: <E1BKy57-000NM4-Qh@santinel.home.ua> Resent-Message-ID: <200405041230.i44CU7Ge060073@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 66250 >Category: ports >Synopsis: [PATCH] databases/msql: fix compiling whith gcc >= 3.3 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 04 05:30:07 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Andrey Slusar >Release: FreeBSD 5.2-CURRENT i386 >Organization: Santinel >Environment: System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Tue Apr 27 17:54:43 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386 >Description: In OSVERSION > 501103 gcc3.3, ANSI_ARGS not defined. Compiling: === cc -O2 -pipe -march=athlon-xp -I../ -DHAVE_CONFIG_H -DHAVE_SSIZE_T -DHAVE_U_INT -DHAVE_BIT_TYPES -D_OS_UNIX -fpic -DPIC -DHAVE_DIRENT_H -DHAVE_DIRENT -DHAVE_MMAP -DMSYNC_3 -DINST_DIR='"/usr/local"' -DTARGET='"FreeBSD-5.2-CURRENT-i386"' -DHAVE_RLIMIT_NOFILE -o libmsql.o -c libmsql.c In file included from libmsql.c:52: /usr/include/varargs.h:34:2: #error "<varargs.h> is obsolete with this version of GCC." /usr/include/varargs.h:35:2: #error "Change your code to use <stdarg.h> instead." libmsql.c:222: error: syntax error before "va_dcl" libmsql.c:234: warning: parameter names (without types) in function declaration libmsql.c:234: warning: data definition has no type or storage class libmsql.c:235: error: `args' undeclared here (not in a function) libmsql.c:235: error: syntax error before "int" libmsql.c:235: warning: data definition has no type or storage class libmsql.c:236: error: conflicting types for `fmt' libmsql.c:232: error: previous declaration of `fmt' libmsql.c:236: error: `args' undeclared here (not in a function) libmsql.c:236: error: syntax error before "char" libmsql.c:236: warning: data definition has no type or storage class *** Error code 1 Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386/msql. *** Error code 1 Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386/msql. *** Error code 1 Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386. *** Error code 1 Stop in /usr/ports/databases/msql/work/msql-2.0.12/targets/FreeBSD-5.2-CURRENT-i386. *** Error code 1 Stop in /usr/ports/databases/msql/work/msql-2.0.12. *** Error code 1 Stop in /usr/ports/databases/msql. === >How-To-Repeat: Compile port whith FreeBSD > 5.1 >Fix: --- msql.diff begins here --- diff -ruN msql/Makefile msql.new/Makefile --- msql/Makefile Sat Apr 10 21:30:18 2004 +++ msql.new/Makefile Tue May 4 14:08:15 2004 @@ -67,6 +67,10 @@ .include <bsd.port.pre.mk> +.if ${OSVERSION} > 501103 +EXTRA_PATCHES+= ${PATCHDIR}/gcc33-patch +.endif + .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) IGNORE="- You must manually obtain ${DISTFILES} from 'http://www.Hughes.com.au/download/' and place it in ${DISTDIR}. The distribution requires registration prior to use" .endif diff -ruN msql/files/gcc33-patch msql.new/files/gcc33-patch --- msql/files/gcc33-patch Thu Jan 1 03:00:00 1970 +++ msql.new/files/gcc33-patch Tue May 4 14:00:25 2004 @@ -0,0 +1,20 @@ +--- src/msql/libmsql.c.orig Wed Aug 22 03:17:08 2001 ++++ src/msql/libmsql.c Tue May 4 13:42:18 2004 +@@ -31,6 +31,7 @@ + # include <stdlib.h> + # include <string.h> + ++#define ANSI_ARGS + + #if defined(_OS_WIN32) + # include <winsock.h> +--- src/msql/msqld.c.old Tue May 4 13:52:34 2004 ++++ src/msql/msqld.c Tue May 4 13:52:56 2004 +@@ -23,6 +23,7 @@ + # include <os2.h> + #endif + ++#define ANSI_ARGS + + #include <stdio.h> + #include <fcntl.h> --- msql.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BKy57-000NM4-Qh>