From 77b4928d8d9e4ece86ff1802b87d737c6f17b9a1 Mon Sep 17 00:00:00 2001 From: BJ Weschke Date: Sun, 19 Oct 2008 19:07:05 +0000 Subject: [PATCH] Fix the 1.4 branch compile again broken with r150557 when using with Zaptel and not DAHDI (closes issue #13740) reported by: jmls patch by: bweschke git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151100 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/asterisk.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main/asterisk.c b/main/asterisk.c index c7fe4b82e6..c3191711d3 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -74,11 +74,18 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include -#if defined(HAVE_DAHDI) +#if defined(HAVE_ZAPTEL) || defined (HAVE_DAHDI) #include +#endif + +#if defined(HAVE_DAHDI) #include "asterisk/dahdi_compat.h" #endif +#if defined(HAVE_ZAPTEL) +#include +#endif + #ifdef linux #include #ifdef HAVE_CAP @@ -2991,7 +2998,7 @@ int main(int argc, char *argv[]) int x = 160; fd = open("/dev/zap/timer", O_RDWR); if (fd >= 0) { - if (ioctl(fd, DAHDI_TIMERCONFIG, &x)) { + if (ioctl(fd, ZT_TIMERCONFIG, &x)) { ast_log(LOG_ERROR, "You have Zaptel built and drivers loaded, but the Zaptel timer test failed to set ZT_TIMERCONFIG to %d.\n", x); exit(1); }