[asterisk-bugs] [Asterisk 0014120]: r166257 does not compiles reporting error at chan_iax2.c
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Dec 23 00:29:25 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14120
======================================================================
Reported By: wetwired
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 14120
Category: Channels/chan_iax2
Reproducibility: always
Severity: minor
Priority: normal
Status: ready for testing
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!): 166257
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-12-22 03:41 CST
Last Modified: 2008-12-23 00:29 CST
======================================================================
Summary: r166257 does not compiles reporting error at
chan_iax2.c
Description:
chan_iax2.c: In function ‘load_module’:
chan_iax2.c:11238: error: ‘DAHDI_FILE_PSEUDO’ undeclared (first use in
this function)
chan_iax2.c:11238: error: (Each undeclared identifier is reported only
once
chan_iax2.c:11238: error: for each function it appears in.)
======================================================================
----------------------------------------------------------------------
(0096876) wetwired (reporter) - 2008-12-23 00:29
http://bugs.digium.com/view.php?id=14120#c96876
----------------------------------------------------------------------
Nope, patch didn't help. Now I have such errors:
chan_iax2.c: In function ‘load_module’:
chan_iax2.c:11238: error: ‘DAHDI_DIR_NAME’ undeclared (first use in
this function)
chan_iax2.c:11238: error: (Each undeclared identifier is reported only
once
chan_iax2.c:11238: error: for each function it appears in.)
chan_iax2.c:11238: error: expected ‘)’ before string constant
chan_iax2.c:11238: error: too few arguments to function ‘open’
And if I turn off IAX channel compiling:
asterisk.c: In function ‘main’:
asterisk.c:3040: error: ‘DAHDI_DIR_NAME’ undeclared (first use in this
function)
asterisk.c:3040: error: (Each undeclared identifier is reported only once
asterisk.c:3040: error: for each function it appears in.)
asterisk.c:3040: error: expected ‘)’ before string constant
asterisk.c:3040: error: too few arguments to function ‘open’
asterisk.c:3042: warning: implicit declaration of function ‘ioctl’
asterisk.c:3042: error: ‘DAHDI_TIMERCONFIG’ undeclared (first use in
this function)
asterisk.c:3043: error: expected ‘)’ before ‘DAHDI_NAME’
asterisk.c:3049: error: expected ‘)’ before ‘DAHDI_NAME’
asterisk.c:3057: error: expected ‘}’ before ‘DAHDI_NAME’
I think it caused by this logic in dahdi_compat:
#if defined(HAVE_DAHDI)
#include <dahdi/user.h>
#define DAHDI_DIR_NAME "/dev/dahdi"
#define DAHDI_NAME "DAHDI"
#elif defined(HAVE_ZAPTEL)
#include <zaptel/zaptel.h>
#define DAHDI_DIR_NAME "/dev/zap"
#define DAHDI_NAME "DAHDI"
/* Compiling against Zaptel instead of DAHDI */
...
so if we haven't defined HAVE_DAHDI and HAVE_ZAPTEL, DAHDI_DIR_NAME would
be also undefined. And then we use undefined DAHDI_DIR_NAME:
#define DAHDI_FILE_CHANNEL DAHDI_DIR_NAME "/channel"
#define DAHDI_FILE_CTL DAHDI_DIR_NAME "/ctl"
#define DAHDI_FILE_PSEUDO DAHDI_DIR_NAME "/pseudo"
#define DAHDI_FILE_TIMER DAHDI_DIR_NAME "/timer"
#define DAHDI_FILE_TRANSCODE DAHDI_DIR_NAME "/transcode"
Issue History
Date Modified Username Field Change
======================================================================
2008-12-23 00:29 wetwired Note Added: 0096876
======================================================================
More information about the asterisk-bugs
mailing list