1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
Fixed build errors for linx-mod with kernel >= 3.15.0
Upstream-Status: Not Applicable
Signed-off-by: Huimin She <huimin.she@enea.com>
---
diff -rup a/af_linx.c b/af_linx.c
--- a/af_linx.c 2014-07-25 16:22:23.295570583 +0200
+++ b/af_linx.c 2014-07-25 16:22:23.299570583 +0200
@@ -743,7 +743,11 @@ setup_receive_filter(struct sock *sk, st
/* This function is called to wake up a receiving socket when it is sleeping
* waiting for a new message in poll or select.
*/
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))
static void linx_data_ready(struct sock *sk, int len)
+#else
+static void linx_data_ready(struct sock *sk)
+#endif
{
linx_check_sock(sk);
@@ -1401,7 +1405,11 @@ linx_do_legacy_sendmsg(struct sock *sk,
LINX_SOCK_STAT_QUEUE_SIGNAL(to, payload_size);
#endif
/* Wake up the receiver, if it sleeps and wait for the signal. */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))
to->sk_data_ready(to, payload_size);
+#else
+ to->sk_data_ready(to);
+#endif
return 0;
out:
@@ -1577,7 +1585,11 @@ linx_do_sendmsg(struct sock *sk,
LINX_SOCK_STAT_QUEUE_SIGNAL(to, payload_size);
#endif
/* Wake up the receiver, if it sleeps and wait for the signal. */
- to->sk_data_ready(to, payload_size);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))
+ to->sk_data_ready(to, payload_size);
+#else
+ to->sk_data_ready(to);
+#endif
return 0;
out:
@@ -1636,7 +1648,11 @@ int __linx_do_sendmsg_skb_to_local_sk(st
LINX_SOCK_STAT_QUEUE_SIGNAL(to, payload_size);
#endif
/* Wake up the receiver, if it sleeps and waits for the signal. */
- to->sk_data_ready(to, payload_size);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))
+ to->sk_data_ready(to, payload_size);
+#else
+ to->sk_data_ready(to);
+#endif
return 0;
}
|