logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0003-Avoid-initialization-of-flexible-array-member.patch (1174B)


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