1 |
chainsaw 09/04/06 14:59:27 |
2 |
|
3 |
Added: zaptel-1.2.27-hrtimer.patch |
4 |
Log: |
5 |
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. |
6 |
(Portage version: 2.1.6.11/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/zaptel/files/zaptel-1.2.27-hrtimer.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: zaptel-1.2.27-hrtimer.patch |
15 |
=================================================================== |
16 |
diff -uNr zaptel-1.2.27.ORIG/ztdummy.c zaptel-1.2.27/ztdummy.c |
17 |
--- zaptel-1.2.27.ORIG/ztdummy.c 2009-04-06 10:36:51.000000000 +0100 |
18 |
+++ zaptel-1.2.27/ztdummy.c 2009-04-06 10:40:21.000000000 +0100 |
19 |
@@ -107,6 +107,19 @@ |
20 |
# error "This kernel is too old: not supported by this file" |
21 |
#endif |
22 |
|
23 |
+#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) ) |
24 |
+/* compatibility with new hrtimer interface */ |
25 |
+static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer) |
26 |
+{ |
27 |
+ return timer->expires; |
28 |
+} |
29 |
+ |
30 |
+static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
31 |
+{ |
32 |
+ timer->expires = time; |
33 |
+} |
34 |
+#endif |
35 |
+ |
36 |
static struct ztdummy *ztd; |
37 |
|
38 |
static int debug = 0; |
39 |
@@ -192,7 +205,7 @@ |
40 |
* expired. |
41 |
* We should worry if overrun is 2 or more; then we really missed |
42 |
* a tick */ |
43 |
- overrun = hrtimer_forward(&zaptimer, htmr->expires, |
44 |
+ overrun = hrtimer_forward(&zaptimer, hrtimer_get_expires(htmr), |
45 |
ktime_set(0, ZAPTEL_TIME_NS)); |
46 |
if(overrun > 1) { |
47 |
if(printk_ratelimit()) |
48 |
@@ -217,7 +230,7 @@ |
49 |
{ |
50 |
zt_receive(&ztd->span); |
51 |
zt_transmit(&ztd->span); |
52 |
- timer.expires = jiffies + 1; |
53 |
+ hrtimer_set_expires(timer, jiffies + 1); |
54 |
add_timer(&timer); |
55 |
} |
56 |
#endif |