summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-08-22 00:28:00 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-09-06 16:57:52 +0200
commita790d833120bed74ebaefa6372609bdfb943fe82 (patch)
tree22f22c21998b19263885c734db5982aee5680dff
parentd195482b00f69fc268ad4e832e994bcae516cc33 (diff)
header: skbuff: fix signature of skb_put(), skb_push() and __skb_push()
In older kernel versions these functions returned a unsigned char*, now they return a void *. This change was done in upstream commit d58ff35122847a8 ("networking: make skb_push & __skb_push return void pointers") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--backport/backport-include/linux/skbuff.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index 09894a96..61f3b98f 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -316,6 +316,24 @@ __u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb)
#endif
#if LINUX_VERSION_IS_LESS(4,13,0)
+static inline void *backport_skb_put(struct sk_buff *skb, unsigned int len)
+{
+ return skb_put(skb, len);
+}
+#define skb_put LINUX_BACKPORT(skb_put)
+
+static inline void *backport_skb_push(struct sk_buff *skb, unsigned int len)
+{
+ return skb_push(skb, len);
+}
+#define skb_push LINUX_BACKPORT(skb_push)
+
+static inline void *backport___skb_push(struct sk_buff *skb, unsigned int len)
+{
+ return __skb_push(skb, len);
+}
+#define __skb_push LINUX_BACKPORT(__skb_push)
+
static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len)
{
void *tmp = skb_put(skb, len);