[PATCH 47/75] headers: Handle skb_recv_datagram() signature change.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Older kernel versions have an separate boolean option for the
MSG_DONTWAIT flag. Adapt drivers using the old code.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/skbuff.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index d407752f..b40d25c5 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -80,4 +80,12 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
 #define napi_build_skb build_skb
 #endif
 
+#if LINUX_VERSION_IS_LESS(5,18,6)
+static inline struct sk_buff *LINUX_BACKPORT(skb_recv_datagram)(struct sock *sk, unsigned int flags, int *err)
+{
+	return skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, flags & MSG_DONTWAIT, err);
+}
+#define skb_recv_datagram LINUX_BACKPORT(skb_recv_datagram)
+#endif /* < 5.17 */
+
 #endif /* __BACKPORT_SKBUFF_H */
-- 
2.45.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux