summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Knoblich <stkn@gentoo.org>2006-06-08 02:19:26 +0000
committerStefan Knoblich <stkn@gentoo.org>2006-06-08 02:19:26 +0000
commit88ac1fd8b37339ea2c45688a7753e9a62a269ede (patch)
treee94cb82664fc2d4237aaf9136b839e33fe5dc875 /net-misc
parentonly one inherit line allowed (diff)
downloadgentoo-2-88ac1fd8b37339ea2c45688a7753e9a62a269ede.tar.gz
gentoo-2-88ac1fd8b37339ea2c45688a7753e9a62a269ede.tar.bz2
gentoo-2-88ac1fd8b37339ea2c45688a7753e9a62a269ede.zip
Fix zaptel-1.0.10 for linux-2.6.16 and silence some warning messages.
(Portage version: 2.1_rc4-r3)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/zaptel/ChangeLog7
-rw-r--r--net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff118
-rw-r--r--net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff44
-rw-r--r--net-misc/zaptel/zaptel-1.0.10.ebuild9
4 files changed, 175 insertions, 3 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog
index eaf94331b61e..9053d7b4f42c 100644
--- a/net-misc/zaptel/ChangeLog
+++ b/net-misc/zaptel/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/zaptel
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.75 2006/06/07 17:55:54 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.76 2006/06/08 02:19:26 stkn Exp $
+
+ 08 Jun 2006; Stefan Knoblich <stkn@gentoo.org>
+ +files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff,
+ +files/zaptel-1.0.10-linux2.6.16.diff, zaptel-1.0.10.ebuild:
+ Fix zaptel-1.0.10 for linux-2.6.16 and silence some warning messages.
*zaptel-1.2.6 (07 Jun 2006)
diff --git a/net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff b/net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff
new file mode 100644
index 000000000000..b4f1b524a6f9
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff
@@ -0,0 +1,118 @@
+--- zaptel-1.0.10/zaptel.c.orig 2006-06-08 01:59:11.000000000 +0000
++++ zaptel-1.0.10/zaptel.c 2006-06-08 02:00:02.000000000 +0000
+@@ -1260,7 +1260,7 @@
+ #ifndef LINUX26
+ MOD_INC_USE_COUNT;
+ #endif
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("ZAPNET: Opened channel %d name %s\n", ms->channo, ms->name);
+ #endif
+ return 0;
+@@ -1420,7 +1420,7 @@
+ dev->trans_start = jiffies;
+ stats->tx_packets++;
+ stats->tx_bytes += ss->writen[oldbuf];
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Buffered %d bytes to go out in buffer %d\n", ss->writen[oldbuf], oldbuf);
+ for (x=0;x<ss->writen[oldbuf];x++)
+ printk("%02x ", ss->writebuf[oldbuf][x]);
+@@ -1521,7 +1521,7 @@
+ some space for us */
+ ss->outwritebuf = oldbuf;
+ }
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Buffered %d bytes (skblen = %d) to go out in buffer %d\n", ss->writen[oldbuf], skb->len, oldbuf);
+ for (x=0;x<ss->writen[oldbuf];x++)
+ printk("%02x ", ss->writebuf[oldbuf][x]);
+@@ -1732,7 +1732,7 @@
+ amnt = chan->blocksize;
+ }
+
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("zt_chan_write(unit: %d, inwritebuf: %d, outwritebuf: %d amnt: %d\n",
+ unit, chan->inwritebuf, chan->outwritebuf, amnt);
+ #endif
+@@ -1918,7 +1918,7 @@
+ } else {
+ for (x=0;x<NUM_SIGS;x++) {
+ if (outs[x][0] == chan->sig) {
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Setting bits to %d for channel %s state %d in %d signalling\n", outs[x][txsig + 1], chan->name, txsig, chan->sig);
+ #endif
+ chan->txhooksig = txsig;
+@@ -3008,14 +3008,14 @@
+ if (!chan->span)
+ return;
+
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Recalculating slaves on %s\n", chan->name);
+ #endif
+
+ /* Link all slaves appropriately */
+ for (x=chan->chanpos;x<chan->span->channels;x++)
+ if (chan->span->chans[x].master == chan) {
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Channel %s, slave to %s, last is %s, its next will be %d\n",
+ chan->span->chans[x].name, chan->name, last->name, x);
+ #endif
+@@ -3024,7 +3024,7 @@
+ }
+ /* Terminate list */
+ last->nextslave = 0;
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Done Recalculating slaves on %s (last is %s)\n", chan->name, last->name);
+ #endif
+ }
+@@ -3271,7 +3271,7 @@
+ if (y >= 0) chans[ch.chan]->rxsig = (unsigned char)y;
+ chans[ch.chan]->rxhooksig = ZT_RXSIG_INITIAL;
+ }
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Configured channel %s, flags %04x, sig %04x\n", chans[ch.chan]->name, chans[ch.chan]->flags, chans[ch.chan]->sig);
+ #endif
+ spin_unlock_irqrestore(&chans[ch.chan]->lock, flags);
+@@ -5229,7 +5229,7 @@
+ zt_rbs_sethook(chan,ZT_TXSIG_OFFHOOK, ZT_TXSTATE_AFTERSTART, ZT_AFTERSTART_TIME);
+ }
+ chan->kewlonhook = 0;
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Off hook on channel %d, itimer = %d, gotgs = %d\n", chan->channo, chan->itimer, chan->gotgs);
+ #endif
+ if (chan->itimer) /* if timer still running */
+@@ -5748,7 +5748,7 @@
+ oldbuf = ms->inreadbuf;
+ ms->infcs = PPP_INITFCS;
+ ms->readn[ms->inreadbuf] = ms->readidx[ms->inreadbuf];
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("EOF, len is %d\n", ms->readn[ms->inreadbuf]);
+ #endif
+ #if defined(CONFIG_ZAPATA_NET) || defined(CONFIG_ZAPATA_PPP)
+@@ -5818,7 +5818,7 @@
+ /* Whoops, we're full, and have no where else
+ to store into at the moment. We'll drop it
+ until there's a buffer available */
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Out of storage space\n");
+ #endif
+ ms->inreadbuf = -1;
+@@ -5841,7 +5841,7 @@
+ if (!ms->rxdisable) { /* if receiver enabled */
+ /* Notify a blocked reader that there is data available
+ to be read, unless we're waiting for it to be full */
+-#if CONFIG_ZAPATA_DEBUG
++#ifdef CONFIG_ZAPATA_DEBUG
+ printk("Notifying reader data in block %d\n", oldbuf);
+ #endif
+ wake_up_interruptible(&ms->readbufq);
diff --git a/net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff b/net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff
new file mode 100644
index 000000000000..de56811d692c
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.0.10-linux2.6.16.diff
@@ -0,0 +1,44 @@
+--- zaptel-1.0.10/zaptel.c.orig 2006-06-08 01:53:19.000000000 +0000
++++ zaptel-1.0.10/zaptel.c 2006-06-08 01:56:35.000000000 +0000
+@@ -4419,7 +4419,11 @@
+ for (x = 0; x < span->channels; x++) {
+ char chan_name[50];
+ sprintf(chan_name, "zap%d", span->chans[x].channo);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+ class_device_create(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name);
++#else
++ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name);
++#endif
+ }
+ #endif /* CONFIG_ZAP_UDEV */
+
+@@ -6445,10 +6449,17 @@
+
+ #ifdef CONFIG_ZAP_UDEV /* udev support functions */
+ zap_class = class_create(THIS_MODULE, "zaptel");
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+ class_device_create(zap_class, MKDEV(ZT_MAJOR, 253), NULL, "zaptimer");
+ class_device_create(zap_class, MKDEV(ZT_MAJOR, 254), NULL, "zapchannel");
+ class_device_create(zap_class, MKDEV(ZT_MAJOR, 255), NULL, "zappseudo");
+ class_device_create(zap_class, MKDEV(ZT_MAJOR, 0), NULL, "zapctl");
++#else
++ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 253), NULL, "zaptimer");
++ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 254), NULL, "zapchannel");
++ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 255), NULL, "zappseudo");
++ class_device_create(zap_class, NULL, MKDEV(ZT_MAJOR, 0), NULL, "zapctl");
++#endif
+ #endif /* CONFIG_ZAP_UDEV */
+
+ #ifdef CONFIG_DEVFS_FS
+--- zaptel-1.0.10/wcusb.c.orig 2006-06-08 02:05:33.000000000 +0000
++++ zaptel-1.0.10/wcusb.c 2006-06-08 02:06:08.000000000 +0000
+@@ -1448,7 +1448,9 @@
+ static struct usb_driver wc_usb_driver =
+ {
+ #ifdef LINUX26
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+ owner: THIS_MODULE,
++#endif
+ #else
+ fops: NULL,
+ minor: 0,
diff --git a/net-misc/zaptel/zaptel-1.0.10.ebuild b/net-misc/zaptel/zaptel-1.0.10.ebuild
index 5040d4181f59..5ed45f928d17 100644
--- a/net-misc/zaptel/zaptel-1.0.10.ebuild
+++ b/net-misc/zaptel/zaptel-1.0.10.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.10.ebuild,v 1.1 2005/12/02 03:32:51 stkn Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.0.10.ebuild,v 1.2 2006/06/08 02:19:26 stkn Exp $
IUSE="bri devfs26 rtc ukcid"
@@ -135,6 +135,11 @@ src_unpack() {
# see http://www.lusyn.com/asterisk/patches.html for more information
use ukcid && \
epatch ${FILESDIR}/${PN}-1.0.10-ukcid.patch
+
+ # buy some time to get 1.2 into shape,
+ # fix 2.6.16 compile errors and CONFIG_ZAPATA_DEBUG undefined warnings
+ epatch ${FILESDIR}/zaptel-1.0.10-linux2.6.16.diff
+ epatch ${FILESDIR}/zaptel-1.0.10-fix-zapata-debug-undefined-warnings.diff
}
src_compile() {