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); }