diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index aefc0b26ef..b50c968fde 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -11231,6 +11231,7 @@ static int load_module(void) iax_set_error(iax_error_output); jb_setoutput(jb_error_output, jb_warning_output, NULL); +#ifdef HAVE_DAHDI #ifdef DAHDI_TIMERACK timingfd = open(DAHDI_FILE_TIMER, O_RDWR); if (timingfd < 0) @@ -11238,6 +11239,7 @@ static int load_module(void) timingfd = open(DAHDI_FILE_PSEUDO, O_RDWR); if (timingfd < 0) ast_log(LOG_WARNING, "Unable to open IAX timing interface: %s\n", strerror(errno)); +#endif memset(iaxs, 0, sizeof(iaxs)); diff --git a/main/asterisk.c b/main/asterisk.c index 2afe01a81d..8ef99c6830 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3034,6 +3034,7 @@ int main(int argc, char *argv[]) dahdi_chan_name_len = &_dahdi_chan_name_len; dahdi_chan_mode = &_dahdi_chan_mode; +#ifdef HAVE_DAHDI { int fd; int x = 160; @@ -3070,6 +3071,7 @@ int main(int argc, char *argv[]) close(fd); } } +#endif threadstorage_init(); astobj2_init();