Package: ttt
Severity: normal
Tags: patch
When building 'ttt' on amd64 with gcc-4.0,
I get the following error:
gcc -O2 -Wwrite-strings -fwritable-strings -DSTDC_HEADERS=1
-DHAVE_SYS_QUEUE_H=1 -DHAVE_GETHOSTENT=1 -DHAVE_LIBNSL=1 -DHAVE_LIBM=1
-DHAVE_LIBDL=1 -D_BSD_SOURCE -DIPV6 -DTTT_LIBRARY=\"/usr/lib/ttt\" -I.
-I/usr/include/tk8.4 -I/usr/include/tcl8.4 -I/usr/include -c ttt.c
cc1: error: unrecognized command line option "-fwritable-strings"
make[1]: *** [ttt.o] Error 1
make[1]: Leaving directory `/ttt-1.7'
make: *** [build-arch-stamp] Error 2
When this is fixed, I get
gcc -O2 -DSTDC_HEADERS=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_GETHOSTENT=1
-DHAVE_LIBNSL=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_ITCL_H=1 -D_BSD_SOURCE
-DIPV6 -DTTT_LIBRARY=\"/usr/lib/ttt\" -I. -I/usr/include/tk8.4
-I/usr/include/tcl8.4 -I/usr/include -I/usr/X11R6/include -c net_names.c
net_names.c: In function 'net_getname':
net_names.c:261: error: invalid storage class for function 'inet6_ntoa'
net_names.c: At top level:
net_names.c:529: error: conflicting types for 'inet6_ntoa'
net_names.c:270: error: previous implicit declaration of 'inet6_ntoa' was here
make[1]: *** [net_names.o] Error 1
make[1]: Leaving directory `/srv/dbuild/tmp/ttt-1.7'
With the attached patch 'ttt' can be compiled
on amd64 using gcc-4.0. This patch includes a fix which was
already necessary for gcc-3.4 (see #262758).
Regards
Andreas Jochens
diff -urN ../tmp-orig/ttt-1.7/configure ./configure
--- ../tmp-orig/ttt-1.7/configure 2002-10-22 13:01:19.000000000 +0200
+++ ./configure 2005-02-09 14:26:36.000000000 +0100
@@ -1098,7 +1098,7 @@
fi
if test "${tttHaveGcc}" = "yes" ; then
- GCCFLAGS="-Wwrite-strings -fwritable-strings"
+ GCCFLAGS=""
else
GCCFLAGS=""
fi
diff -urN ../tmp-orig/ttt-1.7/configure.in ./configure.in
--- ../tmp-orig/ttt-1.7/configure.in 2002-10-22 13:01:02.000000000 +0200
+++ ./configure.in 2005-02-09 14:26:07.000000000 +0100
@@ -109,7 +109,7 @@
fi
if test "${tttHaveGcc}" = "yes" ; then
- GCCFLAGS="-Wwrite-strings -fwritable-strings"
+ GCCFLAGS=""
else
GCCFLAGS=""
fi
diff -urN ../tmp-orig/ttt-1.7/net_names.c ./net_names.c
--- ../tmp-orig/ttt-1.7/net_names.c 2000-12-20 15:30:09.000000000 +0100
+++ ./net_names.c 2005-02-09 14:41:36.180046553 +0100
@@ -158,6 +158,9 @@
return NULL;
}
+static char *inet6_ntoa(uint32_t *addr); /* should be replaced
+ by addr2ascii */
+
char *net_getname(long type, long *id)
{
char *buf, *name;
@@ -258,8 +261,6 @@
case TTTTYPE_IPV6HOST:
{
u_long tmp[4];
- static char *inet6_ntoa(u_long *addr); /* should be replaced
- by addr2ascii */
if ((buf = malloc(sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx")))
== NULL)
fatal_error("get_protoname: no memory\n");
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]