[PATCH] header: add possible_{write,read}_pnet() on kernel >= 4.1

Hauke Mehrtens hauke at hauke-m.de
Fri May 1 05:17:24 EDT 2015


backports only adds the possible_{write,read}_pnet() functions for
kernel < 4.1. This results in a compile error on kernel 4.1. This patch
make it use the original functions on these kernel versions. This fixes
a problem introduced in 3d418885971.

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 backport/backport-include/net/net_namespace.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backport/backport-include/net/net_namespace.h b/backport/backport-include/net/net_namespace.h
index 90c044f..4d0b721 100644
--- a/backport/backport-include/net/net_namespace.h
+++ b/backport/backport-include/net/net_namespace.h
@@ -57,6 +57,9 @@ static inline struct net *possible_read_pnet(const possible_net_t *pnet)
 	return &init_net;
 #endif
 }
+#else
+#define possible_write_pnet(pnet, net) write_pnet(pnet, net)
+#define possible_read_pnet(pnet) read_pnet(pnet)
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
 
 #endif	/* _COMPAT_NET_NET_NAMESPACE_H */
-- 
2.1.4


--------------040009080104030803080302
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

--------------040009080104030803080302--



More information about the openwrt-devel mailing list