--- /dev/null
+--- branches/1.4/channels/chan_dahdi.c 2008/10/08 22:22:09 147681
++++ branches/1.4/channels/chan_dahdi.c 2008/10/17 15:31:35 150557
+@@ -3668,7 +3668,7 @@
+ {
+ int res;
+ struct dahdi_spaninfo zi;
+-#if defined(HAVE_DAHDI) || defined(HAVE_ZAPTEL_CHANALARMS)
++#if !defined(HAVE_ZAPTEL) || defined(HAVE_ZAPTEL_CHANALARMS)
+ /*
+ * The conditional compilation is needed only in asterisk-1.4 for
+ * backward compatibility with old zaptel drivers that don't have
+@@ -3687,7 +3687,7 @@
+ }
+ if (zi.alarms != DAHDI_ALARM_NONE)
+ return zi.alarms;
+-#if defined(HAVE_DAHDI) || defined(HAVE_ZAPTEL_CHANALARMS)
++#if !defined(HAVE_ZAPTEL) || defined(HAVE_ZAPTEL_CHANALARMS)
+ /* No alarms on the span. Check for channel alarms. */
+ if ((res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, ¶ms)) >= 0)
+ return params.chan_alarms;