From c230e967d9547c6ada39041fed1c78f7b49dbbe4 Mon Sep 17 00:00:00 2001 From: Peter Volkov Date: Mon, 15 Dec 2008 11:26:37 +0000 Subject: Fixed build issues with recent (2.2.2{6,7}) kernels. (Portage version: 2.2_rc17/cvs/Linux 2.6.26-openvz.git-89451f9 i686) --- net-misc/zaptel/ChangeLog | 7 +- net-misc/zaptel/files/zaptel-1.2.27-kernel.patch | 18 ++++ .../zaptel/files/zaptel-1.2.27-semaphore.patch | 118 +++++++++++++++++++++ net-misc/zaptel/zaptel-1.2.27.ebuild | 4 +- 4 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 net-misc/zaptel/files/zaptel-1.2.27-kernel.patch create mode 100644 net-misc/zaptel/files/zaptel-1.2.27-semaphore.patch (limited to 'net-misc/zaptel') diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index c9e3a8f61203..6881fd295890 100644 --- a/net-misc/zaptel/ChangeLog +++ b/net-misc/zaptel/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-misc/zaptel # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.112 2008/09/07 19:29:29 rajiv Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.113 2008/12/15 11:26:36 pva Exp $ + + 15 Dec 2008; Peter Volkov + +files/zaptel-1.2.27-kernel.patch, +files/zaptel-1.2.27-semaphore.patch, + zaptel-1.2.27.ebuild: + Fixed build issues with recent (2.2.2{6,7}) kernels. *zaptel-1.2.27 (07 Sep 2008) diff --git a/net-misc/zaptel/files/zaptel-1.2.27-kernel.patch b/net-misc/zaptel/files/zaptel-1.2.27-kernel.patch new file mode 100644 index 000000000000..775fd921362a --- /dev/null +++ b/net-misc/zaptel/files/zaptel-1.2.27-kernel.patch @@ -0,0 +1,18 @@ +http://bugs.digium.com/view.php?id=13277 + +diff --git a/kernel/zaptel-base.c b/kernel/zaptel-base.c +index 100ef6e..1940e40 100644 +--- a/kernel/zaptel-base.c ++++ b/kernel/zaptel-base.c +@@ -163,7 +163,10 @@ static devfs_handle_t timer; + /* udev necessary data structures. Yeah! */ + #ifdef CONFIG_ZAP_UDEV + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++#define CLASS_DEV_CREATE(class, devt, device, name) \ ++ device_create(class, device, devt, NULL, "%s", name) ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) + #define CLASS_DEV_CREATE(class, devt, device, name) \ + device_create(class, device, devt, name) + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) diff --git a/net-misc/zaptel/files/zaptel-1.2.27-semaphore.patch b/net-misc/zaptel/files/zaptel-1.2.27-semaphore.patch new file mode 100644 index 000000000000..7013c8ad0237 --- /dev/null +++ b/net-misc/zaptel/files/zaptel-1.2.27-semaphore.patch @@ -0,0 +1,118 @@ +http://bugs.digium.com/view.php?id=13277 + +diff --git a/kernel/wctdm24xxp/GpakApi.c b/kernel/wctdm24xxp/GpakApi.c +index 9997b07..7e7170c 100644 +--- a/kernel/wctdm24xxp/GpakApi.c ++++ b/kernel/wctdm24xxp/GpakApi.c +@@ -34,7 +34,11 @@ + */ + + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + + #include "zaptel.h" + +diff --git a/kernel/wctdm24xxp/GpakCust.c b/kernel/wctdm24xxp/GpakCust.c +index 23f2096..3d8c901 100644 +--- a/kernel/wctdm24xxp/GpakCust.c ++++ b/kernel/wctdm24xxp/GpakCust.c +@@ -37,7 +37,11 @@ + + #include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + + #include "zaptel.h" + #include "wctdm24xxp.h" +diff --git a/kernel/wctdm24xxp/base.c b/kernel/wctdm24xxp/base.c +index bfd40b5..4d63af5 100644 +--- a/kernel/wctdm24xxp/base.c ++++ b/kernel/wctdm24xxp/base.c +@@ -44,7 +44,11 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db + #include + #include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + + #ifdef LINUX26 + #include +diff --git a/kernel/wctdm24xxp/wctdm24xxp.h b/kernel/wctdm24xxp/wctdm24xxp.h +index 79e1d30..603dac5 100644 +--- a/kernel/wctdm24xxp/wctdm24xxp.h ++++ b/kernel/wctdm24xxp/wctdm24xxp.h +@@ -29,7 +29,12 @@ + + #include "../zaptel.h" + #include "../voicebus.h" ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + + #define NUM_FXO_REGS 60 + +diff --git a/kernel/wcte12xp/vpmadt032.c b/kernel/wcte12xp/vpmadt032.c +index 141b000..9fc80ca 100644 +--- a/kernel/wcte12xp/vpmadt032.c ++++ b/kernel/wcte12xp/vpmadt032.c +@@ -29,7 +29,12 @@ + */ + + #include ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + #include + #include + #include +diff --git a/kernel/xpp/xpd.h b/kernel/xpp/xpd.h +index e556ef0..35688d6 100644 +--- a/kernel/xpp/xpd.h ++++ b/kernel/xpp/xpd.h +@@ -29,8 +29,13 @@ + #ifdef __KERNEL__ + #include + #include ++#include + #include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + #include + #ifdef XPP_DEBUGFS + #ifndef CONFIG_DEBUG_FS +--- a/kernel/wctc4xxp/base.c 2008-12-15 10:37:54 +0000 ++++ b/kernel/wctc4xxp/base.c 2008-12-15 11:15:49 +0000 +@@ -38,7 +38,12 @@ + #include + #include + #include ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) ++#include ++#else + #include ++#endif + #include + #include + #include + diff --git a/net-misc/zaptel/zaptel-1.2.27.ebuild b/net-misc/zaptel/zaptel-1.2.27.ebuild index 19e10f617f04..8f46938c2b57 100644 --- a/net-misc/zaptel/zaptel-1.2.27.ebuild +++ b/net-misc/zaptel/zaptel-1.2.27.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.27.ebuild,v 1.1 2008/09/07 19:29:29 rajiv Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.27.ebuild,v 1.2 2008/12/15 11:26:36 pva Exp $ inherit toolchain-funcs eutils linux-mod flag-o-matic multilib @@ -173,6 +173,8 @@ src_unpack() { epatch "${FILESDIR}"/${PN}-1.2.26-gentoo.diff epatch "${FILESDIR}"/zaptel-1.2.9.1-ar.patch epatch "${FILESDIR}"/zaptel-1.2.25-xpputils.diff + epatch "${FILESDIR}"/zaptel-1.2.27-kernel.patch + epatch "${FILESDIR}"/zaptel-1.2.27-semaphore.patch # try to apply bristuff patch if use bri; then -- cgit v1.2.3-65-gdbad