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 */
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(+)