[PATCH 3/7] backports: Add nl_set_extack_cookie_u64()

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

 



This was introduced in Linux commit 801f87469ee8 ("netlink: add
nl_set_extack_cookie_u64()") and is used by the wireless subsystem.

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

diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index f956a769..0fb8e0f3 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -58,4 +58,15 @@ struct netlink_ext_ack {
 } while (0)
 #endif /* NL_SET_BAD_ATTR */
 
+#if LINUX_VERSION_IS_LESS(5,0,0)
+static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
+					    u64 cookie)
+{
+	u64 __cookie = cookie;
+
+	memcpy(extack->cookie, &__cookie, sizeof(__cookie));
+	extack->cookie_len = sizeof(__cookie);
+}
+#endif
+
 #endif /* __BACKPORT_LINUX_NETLINK_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[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