master hovercats/oakiss / pkg / libnl / patch / 0003-Avoid-initialization-of-flexible-array-member.patch
 1From d1f59de10a2fbce42735b3a1938ecd4d60c8e205 Mon Sep 17 00:00:00 2001
 2From: Michael Forney <mforney@mforney.org>
 3Date: Sun, 11 Aug 2019 21:55:54 +0000
 4Subject: [PATCH] Avoid initialization of flexible array member
 5
 6---
 7 include/netlink-private/cache-api.h | 2 +-
 8 include/netlink-private/netlink.h   | 2 +-
 9 2 files changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/include/netlink-private/cache-api.h b/include/netlink-private/cache-api.h
12index c684e79..82be310 100644
13--- a/include/netlink-private/cache-api.h
14+++ b/include/netlink-private/cache-api.h
15@@ -259,7 +259,7 @@ struct nl_cache_ops
16 	struct genl_ops *	co_genl;
17 
18 	/* Message type definition */
19-	struct nl_msgtype	co_msgtypes[];
20+	struct nl_msgtype	*co_msgtypes;
21 };
22 
23 /** @} */
24diff --git a/include/netlink-private/netlink.h b/include/netlink-private/netlink.h
25index fca3133..1148cec 100644
26--- a/include/netlink-private/netlink.h
27+++ b/include/netlink-private/netlink.h
28@@ -200,7 +200,7 @@ static inline const char *nl_cache_name(struct nl_cache *cache)
29 }
30 
31 #define GENL_FAMILY(id, name) \
32-	{ \
33+	(struct nl_msgtype[]){ \
34 		{ id, NL_ACT_UNSPEC, name }, \
35 		END_OF_MSGTYPES_LIST, \
36 	}
37-- 
382.23.0
39