Skip to contentSkip to conversation

genl: Add forward declaration to fix build warning

PATCH Applied Mat Martineau 2 participants 2 messages Oct 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 genl: Add forward declaration to fix build warning

The l_genl_msg_append_attrv() declaration in genl.h uses struct iovec *, but there's no guarantee that sys/uio.h has been included (and the genl user might not need that header itself).
---

v2: Use forward declaration instead of including system header

 ell/genl.h | 2 ++
 1 file changed, 2 insertions(+)
ell/genl.h +2 -0
index 5df688b..c3f641f 100644
@@ -31,6 +31,8 @@
 extern "C" {
 #endif
 
+struct iovec;
+
 struct l_genl;
 struct l_genl_family_info;
 struct l_genl_family;
Signature · 1 line
2.23.0
#1 lore raw

Hi Mat,

Quoted 10 lines · Mat Martineau

The l_genl_msg_append_attrv() declaration in genl.h uses struct iovec *, but there's no guarantee that sys/uio.h has been included (and the genl user might not need that header itself).
---

v2: Use forward declaration instead of including system header

  ell/genl.h | 2 ++
  1 file changed, 2 insertions(+)

Applied, thanks.

Regards,
-Denis