From 4a6fbca9ed667a059c312ef1f47391660352a82a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20B=C3=BCsch?= Date: Thu, 7 Oct 2010 17:07:46 +0000 Subject: [PATCH] zaptel-1.4: Compilefixes for 2.6.36 SVN-Revision: 23307 --- .../patches/002-upstream_hrtimer.patch | 16 +++++--- .../patches/100-no_hrtimer_on_x86_only.patch | 12 ++++-- .../patches/200-Makefile-pwd.patch | 14 ++++--- libs/zaptel-1.4.x/patches/330-uname_m.patch | 13 ++++--- libs/zaptel-1.4.x/patches/340-2.6.32.patch | 12 +++--- libs/zaptel-1.4.x/patches/370-2.6.36.patch | 39 +++++++++++++++++++ 6 files changed, 81 insertions(+), 25 deletions(-) create mode 100644 libs/zaptel-1.4.x/patches/370-2.6.36.patch diff --git a/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch b/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch index 578266a484..5cc0a6ec0b 100644 --- a/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch +++ b/libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch @@ -1,6 +1,10 @@ ---- a/kernel/ztdummy.c -+++ b/kernel/ztdummy.c -@@ -55,7 +55,7 @@ +--- + kernel/ztdummy.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +--- zaptel-1.4.12.1.orig/kernel/ztdummy.c ++++ zaptel-1.4.12.1/kernel/ztdummy.c +@@ -54,7 +54,7 @@ * the #define USE_RTC should be commented out. */ #if defined(__i386__) || defined(__x86_64__) @@ -9,7 +13,7 @@ /* The symbol hrtimer_forward is only exported as of 2.6.22: */ #if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22) #define USE_HIGHRESTIMER -@@ -91,6 +91,18 @@ +@@ -90,6 +90,18 @@ #endif #include "ztdummy.h" @@ -28,7 +32,7 @@ static struct ztdummy *ztd; -@@ -200,7 +212,7 @@ static enum hrtimer_restart ztdummy_hr_i +@@ -199,7 +211,7 @@ static enum hrtimer_restart ztdummy_hr_i * expired. * We should worry if overrun is 2 or more; then we really missed * a tick */ @@ -37,7 +41,7 @@ ktime_set(0, ZAPTEL_TIME_NS)); if(overrun > 1) { if(printk_ratelimit()) -@@ -223,7 +235,7 @@ static enum hrtimer_restart ztdummy_hr_i +@@ -222,7 +234,7 @@ static enum hrtimer_restart ztdummy_hr_i /* use kernel system tick timer if PC architecture RTC is not available */ static void ztdummy_timer(unsigned long param) { diff --git a/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch b/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch index d7fb71cb35..ba4dd76ba2 100644 --- a/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch +++ b/libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch @@ -1,6 +1,10 @@ ---- a/kernel/ztdummy.c -+++ b/kernel/ztdummy.c -@@ -54,7 +54,6 @@ +--- + kernel/ztdummy.c | 2 -- + 1 file changed, 2 deletions(-) + +--- zaptel-1.4.12.1.orig/kernel/ztdummy.c ++++ zaptel-1.4.12.1/kernel/ztdummy.c +@@ -53,7 +53,6 @@ * If using an i386 architecture without a PC real-time clock, * the #define USE_RTC should be commented out. */ @@ -8,7 +12,7 @@ #if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15) /* The symbol hrtimer_forward is only exported as of 2.6.22: */ #if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22) -@@ -67,7 +66,6 @@ +@@ -66,7 +65,6 @@ #define USE_RTC #endif #endif diff --git a/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch b/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch index 1193309bc3..03c3c8aea5 100644 --- a/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch +++ b/libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch @@ -1,10 +1,14 @@ ---- zaptel-1.4.6.org/Makefile 2007-09-20 20:42:35.000000000 +0200 -+++ zaptel-1.4.6/Makefile 2007-11-10 18:07:07.000000000 +0100 -@@ -10,6 +10,7 @@ - ifeq ($(MAKELEVEL),0) +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- zaptel-1.4.12.1.orig/Makefile ++++ zaptel-1.4.12.1/Makefile +@@ -18,6 +18,7 @@ ifeq ($(MAKELEVEL),0) PWD:=$(shell pwd) + export PWD endif +PWD:=`pwd` + ifeq ($(ARCH),) ARCH:=$(shell uname -m | sed -e s/i.86/i386/) - diff --git a/libs/zaptel-1.4.x/patches/330-uname_m.patch b/libs/zaptel-1.4.x/patches/330-uname_m.patch index cf2593492f..8414debf49 100644 --- a/libs/zaptel-1.4.x/patches/330-uname_m.patch +++ b/libs/zaptel-1.4.x/patches/330-uname_m.patch @@ -1,8 +1,11 @@ -diff -urN zaptel-1.4.9.2/Makefile zaptel-1.4.9.2.new/Makefile ---- zaptel-1.4.9.2/Makefile 2008-02-22 01:31:47.000000000 +0100 -+++ zaptel-1.4.9.2.new/Makefile 2009-02-03 15:24:16.000000000 +0100 -@@ -21,7 +21,7 @@ - ARCH:=$(shell uname -m | sed -e s/i.86/i386/) +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- zaptel-1.4.12.1.orig/Makefile ++++ zaptel-1.4.12.1/Makefile +@@ -25,7 +25,7 @@ ARCH:=$(shell uname -m | sed -e s/i.86/i + endif ifeq ($(DEB_HOST_GNU_TYPE),) -UNAME_M:=$(shell uname -m) diff --git a/libs/zaptel-1.4.x/patches/340-2.6.32.patch b/libs/zaptel-1.4.x/patches/340-2.6.32.patch index e9bf28303b..ea9e613877 100644 --- a/libs/zaptel-1.4.x/patches/340-2.6.32.patch +++ b/libs/zaptel-1.4.x/patches/340-2.6.32.patch @@ -1,8 +1,10 @@ -diff --git a/kernel/zaptel-base.c b/kernel/zaptel-base.c -index dbd6588..d4fc584 100644 ---- a/kernel/zaptel-base.c -+++ b/kernel/zaptel-base.c -@@ -60,6 +60,9 @@ +--- + kernel/zaptel-base.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- zaptel-1.4.12.1.orig/kernel/zaptel-base.c ++++ zaptel-1.4.12.1/kernel/zaptel-base.c +@@ -59,6 +59,9 @@ #include #endif #include diff --git a/libs/zaptel-1.4.x/patches/370-2.6.36.patch b/libs/zaptel-1.4.x/patches/370-2.6.36.patch new file mode 100644 index 0000000000..43784f63d7 --- /dev/null +++ b/libs/zaptel-1.4.x/patches/370-2.6.36.patch @@ -0,0 +1,39 @@ +--- + kernel/zaptel-base.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- zaptel-1.4.12.1.orig/kernel/zaptel-base.c ++++ zaptel-1.4.12.1/kernel/zaptel-base.c +@@ -5181,6 +5181,20 @@ static int zt_ioctl(struct inode *inode, + return zt_chan_ioctl(inode, file, cmd, data, unit); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++#include ++static long zt_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long data) ++{ ++ int ret; ++ ++ lock_kernel(); ++ ret = zt_ioctl(file->f_mapping->host, file, cmd, data); ++ unlock_kernel(); ++ ++ return ret; ++} ++#endif ++ + int zt_register(struct zt_span *span, int prefmaster) + { + int x; +@@ -7632,7 +7646,11 @@ static struct file_operations zt_fops = + llseek: NULL, + open: zt_open, + release: zt_release, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ unlocked_ioctl: zt_ioctl_unlocked, ++#else + ioctl: zt_ioctl, ++#endif + read: zt_read, + write: zt_write, + poll: zt_poll, -- 2.30.2