[3/9] batman-adv: Provide skb_cow_head on kernels prior 2.6.23
Commit Message
skb_cow_head was first introduced in v2.6.23-rc6-155-gd9cc204 and we
must use skb_cow on those kernel which will also copy the skb when it
shares data with other skbs and not only when the header is only shared.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
batman-adv/compat.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
@@ -70,6 +70,11 @@ static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len)
return 0;
}
+static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom)
+{
+ return skb_cow(skb, headroom);
+}
+
#define cancel_delayed_work_sync(wq) cancel_delayed_work(wq)
#endif /* < KERNEL_VERSION(2, 6, 23) */