diff mbox series

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

Message ID 20240627234808.1253337-48-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:47 p.m. UTC
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@hauke-m.de>
---
 backport/backport-include/linux/skbuff.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

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 */