zaptel-1.4: Compilefixes for 2.6.36
authorMichael Büsch <mb@bu3sch.de>
Thu, 7 Oct 2010 17:07:46 +0000 (17:07 +0000)
committerMichael Büsch <mb@bu3sch.de>
Thu, 7 Oct 2010 17:07:46 +0000 (17:07 +0000)
SVN-Revision: 23307

libs/zaptel-1.4.x/patches/002-upstream_hrtimer.patch
libs/zaptel-1.4.x/patches/100-no_hrtimer_on_x86_only.patch
libs/zaptel-1.4.x/patches/200-Makefile-pwd.patch
libs/zaptel-1.4.x/patches/330-uname_m.patch
libs/zaptel-1.4.x/patches/340-2.6.32.patch
libs/zaptel-1.4.x/patches/370-2.6.36.patch [new file with mode: 0644]

index 578266a484f37d8884a07082671fef442d9310e9..5cc0a6ec0bd48a4c7c296def8571f9a63c6da26b 100644 (file)
@@ -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__)
   * 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
  /* 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"
  
  #endif
  #include "ztdummy.h"
  
@@ -28,7 +32,7 @@
  
  static struct ztdummy *ztd;
  
  
  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 */
         * 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())
                        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)
  {
  /* use kernel system tick timer if PC architecture RTC is not available */
  static void ztdummy_timer(unsigned long param)
  {
index d7fb71cb35a400ba587cc0f46fb8bc43b678a4ed..ba4dd76ba286b2ddb91672935bf5064ee644bd9f 100644 (file)
@@ -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.
   */
   * 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)
  #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
  #define USE_RTC
  #endif
  #endif
index 1193309bc3180064198e9d70c20a1cbcf6833ada..03c3c8aea5b424a6f83e4056f347c0c8a364d5ca 100644 (file)
@@ -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)
  PWD:=$(shell pwd)
+ export PWD
  endif
 +PWD:=`pwd`
  
  endif
 +PWD:=`pwd`
  
+ ifeq ($(ARCH),)
  ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
  ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
index cf2593492f89071b84087aca867ba8099dbabd0e..8414debf496f2cd49ab5108d036eb508fabc6df5 100644 (file)
@@ -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)
  
  ifeq ($(DEB_HOST_GNU_TYPE),)
 -UNAME_M:=$(shell uname -m)
index e9bf28303b30d084b1660fddd16ff9a0823db783..ea9e61387747679f7fb24d5385500b0687caf53c 100644 (file)
@@ -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 <linux/if_ppp.h>
  #endif
  #include <asm/atomic.h>
  #include <linux/if_ppp.h>
  #endif
  #include <asm/atomic.h>
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 (file)
index 0000000..43784f6
--- /dev/null
@@ -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 <linux/smp_lock.h>
++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,