Bug#297561: asterisk: FTBFS (amd64/gcc-4.0): static declaration of 'uniquelock' follows non-static declaration
Andreas Jochens
Andreas Jochens <aj@andaco.de>, 297561@bugs.debian.org
Tue, 01 Mar 2005 16:32:15 +0100
Package: asterisk
Severity: normal
Tags: patch
When building 'asterisk' on amd64 with gcc-4.0,
I get the following error:
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O2 -DZAPTEL_OPTIMIZATIONS -DASTERISK_VERSION=\"1.0.5-BRIstuffed-0.2.0-RC7e\" -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"/var/run/asterisk\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTDATADIR=\"/usr/share/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/usr/share/asterisk/agi-bin\" -DBUSYDETECT_MARTIN -c -o channel.o channel.c
channel.c:63: error: static declaration of 'uniquelock' follows non-static declaration
include/asterisk/channel.h:58: error: previous declaration of 'uniquelock' was here
make[1]: *** [channel.o] Error 1
make[1]: Leaving directory `/asterisk-1.0.5'
make: *** [build-arch-stamp] Error 2
With the attached patch 'asterisk' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/asterisk-1.0.5/debian/patches/97_bristuff.dpatch ./debian/patches/97_bristuff.dpatch
--- ../tmp-orig/asterisk-1.0.5/debian/patches/97_bristuff.dpatch 2005-03-01 15:49:10.499076547 +0100
+++ ./debian/patches/97_bristuff.dpatch 2005-03-01 15:48:56.090857599 +0100
@@ -2985,7 +2985,7 @@
int (*generate)(struct ast_channel *chan, void *data, int len, int samples);
};
-+extern ast_mutex_t uniquelock;
++
+
//! Main Channel structure associated with a channel.
/*!