Bug#288831: asterisk: FTBFS (amd64/gcc-4.0): invalid storage class for function 'bestdata_break'
Andreas Jochens
Andreas Jochens <aj@andaco.de>, 288831@bugs.debian.org
Wed, 05 Jan 2005 22:40:06 +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 -DASTERISK_VERSION=\"1.0.2\" -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 -Wno-missing-prototypes -Wno-missing-declarations -DZAPATA_PRI -DIAX_TRUNKING -DCRYPTO -fPIC -DPIC -c -o chan_modem_bestdata.o chan_modem_bestdata.c
chan_modem_bestdata.c: In function 'bestdata_startrec':
chan_modem_bestdata.c:52: error: invalid storage class for function 'bestdata_break'
chan_modem_bestdata.c: In function 'bestdata_startplay':
chan_modem_bestdata.c:66: error: invalid storage class for function 'bestdata_break'
chan_modem_bestdata.c: In function 'bestdata_read':
chan_modem_bestdata.c:377: warning: assignment discards qualifiers from pointer target type
make[2]: *** [chan_modem_bestdata.o] Error 1
rm chan_modem_aopen.o chan_modem.o
make[2]: Leaving directory `/asterisk-1.0.2/channels'
With the attached patch 'asterisk' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/asterisk-1.0.2/channels/chan_modem_bestdata.c ./channels/chan_modem_bestdata.c
--- ../tmp-orig/asterisk-1.0.2/channels/chan_modem_bestdata.c 2004-07-16 06:40:54.000000000 +0200
+++ ./channels/chan_modem_bestdata.c 2005-01-05 22:15:57.737291072 +0100
@@ -47,10 +47,10 @@
NULL
};
-static int bestdata_startrec(struct ast_modem_pvt *p)
-{
static int bestdata_break(struct ast_modem_pvt *p);
+static int bestdata_startrec(struct ast_modem_pvt *p)
+{
if (p->ministate != STATE_COMMAND) bestdata_break(p);
if (ast_modem_send(p, "AT+VRX", 0) ||
ast_modem_expect(p, "CONNECT", 5)) {
@@ -61,10 +61,10 @@
return 0;
}
-static int bestdata_startplay(struct ast_modem_pvt *p)
-{
static int bestdata_break(struct ast_modem_pvt *p);
+static int bestdata_startplay(struct ast_modem_pvt *p)
+{
if (p->ministate != STATE_COMMAND) bestdata_break(p);
if (ast_modem_send(p, "AT+VTX", 0) ||
ast_modem_expect(p, "CONNECT", 5)) {
diff -urN ../tmp-orig/asterisk-1.0.2/channels/chan_zap.c ./channels/chan_zap.c
--- ../tmp-orig/asterisk-1.0.2/channels/chan_zap.c 2004-10-25 19:57:25.000000000 +0200
+++ ./channels/chan_zap.c 2005-01-05 22:17:11.755038664 +0100
@@ -1933,11 +1933,12 @@
}
#endif
+static int restore_gains(struct zt_pvt *p);
+
static int zt_hangup(struct ast_channel *ast)
{
int res;
int index,x, law;
- static int restore_gains(struct zt_pvt *p);
struct zt_pvt *p = ast->pvt->pvt;
struct zt_pvt *tmp = NULL;
struct zt_pvt *prev = NULL;