diff options
Diffstat (limited to 'pkg/libnl/patch/0002-Avoid-statement-expression-in-nl_container_of.patch')
| -rw-r--r-- | pkg/libnl/patch/0002-Avoid-statement-expression-in-nl_container_of.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/libnl/patch/0002-Avoid-statement-expression-in-nl_container_of.patch b/pkg/libnl/patch/0002-Avoid-statement-expression-in-nl_container_of.patch new file mode 100644 index 00000000..f0a7aea3 --- /dev/null +++ b/pkg/libnl/patch/0002-Avoid-statement-expression-in-nl_container_of.patch @@ -0,0 +1,28 @@ +From e9b9e271c57d3d3129fa87c8866e91daeffe8144 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 11 Aug 2019 05:14:48 +0000 +Subject: [PATCH] Avoid statement expression in nl_container_of + +--- + include/netlink/list.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/include/netlink/list.h b/include/netlink/list.h +index 2f20634..f116126 100644 +--- a/include/netlink/list.h ++++ b/include/netlink/list.h +@@ -59,9 +59,8 @@ static inline int nl_list_empty(struct nl_list_head *head) + return head->next == head; + } + +-#define nl_container_of(ptr, type, member) ({ \ +- const __typeof__( ((type *)0)->member ) *__mptr = (ptr);\ +- (type *)( (char *)__mptr - (offsetof(type, member)));}) ++#define nl_container_of(ptr, type, member) ( \ ++ (type *)( (char *)(ptr) - (offsetof(type, member)))) + + #define nl_list_entry(ptr, type, member) \ + nl_container_of(ptr, type, member) +-- +2.23.0 + |
