[PATCH 3/4] header: handler new parameter net in sock_create_kern()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linux commit eeb1bd5c4 added a new parameter to sock_create_kern(). In
the original function it was replaced with &init_net every time, now it
is taken from the parameter.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/net.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/backport/backport-include/linux/net.h b/backport/backport-include/linux/net.h
index 0e436d4..4d9250b 100644
--- a/backport/backport-include/linux/net.h
+++ b/backport/backport-include/linux/net.h
@@ -97,4 +97,9 @@ bool __net_get_random_once(void *buf, int nbytes, bool *done,
 
 #endif /* __BACKPORT_NET_GET_RANDOM_ONCE */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+#define sock_create_kern(net, family, type, proto, res) \
+	__sock_create(net, family, type, proto, res, 1)
+#endif
+
 #endif /* __BACKPORT_LINUX_NET_H */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux