diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2009-04-06 14:59:27 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2009-04-06 14:59:27 +0000 |
commit | 7ff61353774498ecd7804efcf4d53e6e829b6ba0 (patch) | |
tree | c388576d14bc9bafda8e9d29270c579bdd849d29 /net-misc/zaptel/files | |
parent | Add ~sh (diff) | |
download | gentoo-2-7ff61353774498ecd7804efcf4d53e6e829b6ba0.tar.gz gentoo-2-7ff61353774498ecd7804efcf4d53e6e829b6ba0.tar.bz2 gentoo-2-7ff61353774498ecd7804efcf4d53e6e829b6ba0.zip |
Port 1.4-branch hrtimer build fix to 1.2.27, fixes build against 2.6.28 kernels. Quote a few variables in the 1.2.18 ebuilds.
(Portage version: 2.1.6.11/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/zaptel/files')
-rw-r--r-- | net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch b/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch new file mode 100644 index 000000000000..3eada3093186 --- /dev/null +++ b/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch @@ -0,0 +1,41 @@ +diff -uNr zaptel-1.2.27.ORIG/ztdummy.c zaptel-1.2.27/ztdummy.c +--- zaptel-1.2.27.ORIG/ztdummy.c 2009-04-06 10:36:51.000000000 +0100 ++++ zaptel-1.2.27/ztdummy.c 2009-04-06 10:40:21.000000000 +0100 +@@ -107,6 +107,19 @@ + # error "This kernel is too old: not supported by this file" + #endif + ++#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) ) ++/* compatibility with new hrtimer interface */ ++static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer) ++{ ++ return timer->expires; ++} ++ ++static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) ++{ ++ timer->expires = time; ++} ++#endif ++ + static struct ztdummy *ztd; + + static int debug = 0; +@@ -192,7 +205,7 @@ + * expired. + * We should worry if overrun is 2 or more; then we really missed + * a tick */ +- overrun = hrtimer_forward(&zaptimer, htmr->expires, ++ overrun = hrtimer_forward(&zaptimer, hrtimer_get_expires(htmr), + ktime_set(0, ZAPTEL_TIME_NS)); + if(overrun > 1) { + if(printk_ratelimit()) +@@ -217,7 +230,7 @@ + { + zt_receive(&ztd->span); + zt_transmit(&ztd->span); +- timer.expires = jiffies + 1; ++ hrtimer_set_expires(timer, jiffies + 1); + add_timer(&timer); + } + #endif |