[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    [PATCH 3/4] header: handler new parameter net in sock_create_kern()
From:       Hauke Mehrtens <hauke () hauke-m ! de>
Date:       2015-05-25 21:44:03
Message-ID: 1432590244-4101-3-git-send-email-hauke () hauke-m ! de
[Download RAW message or body]

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@hauke-m.de>
---
 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic