Skip to contentSkip to conversation

backport-include: map possible_net_t to struct net *

PATCH New Arend van Spriel 1 participant 1 message Mar 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backport-include: map possible_net_t to struct net *

commit 0c5c9fb55106 (net: Introduce possible_net_t) changed use of write_pnet and read_pnet. This patch will map possible_net_t back to struct net * to use old api.

---
 backport/backport-include/net/net_namespace.h | 4 ++++
 1 file changed, 4 insertions(+)
backport/backport-include/net/net_namespace.h +4 -0
index 8927af7..085bce7 100644
@@ -30,4 +30,8 @@ static inline struct net *get_net_ns_by_fd(int fd)
 	return ERR_PTR(-EINVAL);
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
+#define possible_net_t struct net *
+#endif
+
 #endif	/* _COMPAT_NET_NET_NAMESPACE_H */
Signature · 1 line
1.9.1