summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.patch
blob: 87a98121f430274ccf803a291bff6d2796466ce2 (plain)
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
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -884,8 +884,13 @@
 	goto done;
 }
 
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
 static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
 			       char __user *optval, unsigned int len)
+#else
+static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
+			       char __user *optval, int len)
+#endif
 {
 	struct hci_ufilter uf = { .opcode = 0 };
 	struct sock *sk = sock->sk;
@@ -1059,8 +1064,12 @@
 	.obj_size	= sizeof(struct hci_pinfo)
 };
 
+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN)
 static int hci_sock_create(struct net *net, struct socket *sock, int protocol,
 			   int kern)
+#else
+static int hci_sock_create(struct net *net, struct socket *sock, int protocol)
+#endif
 {
 	struct sock *sk;