| #ifndef __BACKPORT_LINUX_NETLINK_H |
| #define __BACKPORT_LINUX_NETLINK_H |
| #include_next <linux/netlink.h> |
| #include <linux/version.h> |
| #if LINUX_VERSION_IS_LESS(4,12,0) |
| #define NETLINK_MAX_COOKIE_LEN 20 |
| const struct nlattr *bad_attr; |
| u8 cookie[NETLINK_MAX_COOKIE_LEN]; |
| #define NL_SET_ERR_MSG(extack, msg) do { \ |
| static const char _msg[] = (msg); \ |
| /* this is for patches we apply */ |
| #if LINUX_VERSION_IS_LESS(3,7,0) |
| #define netlink_notify_portid(__notify) (__notify->pid) |
| #define NETLINK_CB_PORTID(__skb) NETLINK_CB(__skb).pid |
| #define netlink_notify_portid(__notify) (__notify->portid) |
| #define NETLINK_CB_PORTID(__skb) NETLINK_CB(__skb).portid |
| #endif /* __BACKPORT_LINUX_NETLINK_H */ |