diff -Naur wanpipe-voicetime-1.0.9-orig/Makefile wanpipe-voicetime-1.0.9/Makefile --- wanpipe-voicetime-1.0.9-orig/Makefile 2009-04-20 16:55:13.000000000 -0400 +++ wanpipe-voicetime-1.0.9/Makefile 2010-10-19 22:05:14.000000000 -0400 @@ -94,6 +95,10 @@ ZAPDIR_PRIV=$(ZAPDIR) ENABLE_WANPIPEMON_ZAP=YES EXTRA_CFLAGS+= -DSTANDALONE_ZAPATA -DCONFIG_PRODUCT_WANPIPE_TDM_VOICE_DCHAN_ZAPTEL -DDAHDI_ISSUES -DBUILDING_TONEZONE -I$(ZAPDIR)/include -I$(ZAPDIR)/include/dahdi -I$(ZAPDIR)/drivers/dahdi + DAHDI240=$(shell grep 'DAHDI_VERSION "2.4' $(ZAPDIR)/include/dahdi/version.h) + ifneq (,$(DAHDI240)) + EXTRA_CFLAGS+= -DDAHDI240 + endif ZAP_OPTS= --zaptel-path=$(ZAPDIR) ZAP_PROT=TDM PROTS=DEF-TDM diff -Naur wanpipe-voicetime-1.0.9-orig/src/wanpipe_voicetime_main.c wanpipe-voicetime-1.0.9/src/wanpipe_voicetime_main.c --- wanpipe-voicetime-1.0.9-orig/src/wanpipe_voicetime_main.c 2009-04-20 17:08:07.000000000 -0400 +++ wanpipe-voicetime-1.0.9/src/wanpipe_voicetime_main.c 2010-10-19 21:39:20.000000000 -0400 @@ -942,6 +942,37 @@ return 0; } +#ifdef DAHDI240 +static int wud_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) +{ + return 0; +} +static int wud_open(struct dahdi_chan *chan) +{ + return 0; +} +static int wud_close(struct dahdi_chan *chan) +{ + return 0; +} +static int wud_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long data) +{ + return 0; +} +static int wud_watchdog(struct dahdi_span *span, int event) +{ + return 0; +} +static const struct dahdi_span_ops wud_span_ops = { + .owner = THIS_MODULE, + .hooksig = wud_hooksig, + .open = wud_open, + .close = wud_close, + .ioctl = wud_ioctl, + .watchdog = wud_watchdog, +}; +#endif + static int wud_initialize(wud_softc_t *sc) { /* Zapata stuff */ @@ -960,7 +991,12 @@ sc->span.channels = 0; /* no channels on our span */ sc->span.deflaw = ZT_LAW_MULAW; init_waitqueue_head(&sc->span.maintq); +#ifdef DAHDI240 + sc->span.manufacturer = "Sangoma"; + sc->span.ops = &wud_span_ops; +#else sc->span.pvt = sc; +#endif sc->chan->pvt = sc; if (zt_register(&sc->span, 0)) { return -1;