diff mbox series

libxt_addrtype.c - include strings.h for the definition of ffs()

Message ID 20200421081526.108133-1-zenczykowski@gmail.com
State Not Applicable
Headers show
Series libxt_addrtype.c - include strings.h for the definition of ffs() | expand

Commit Message

Maciej Żenczykowski April 21, 2020, 8:15 a.m. UTC
From: Maciej Żenczykowski <maze@google.com>

This resolves compiler warning:

extensions/libext_srcs/gen/gensrcs/external/iptables/extensions/libxt_addrtype.c:263:14: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  int first = ffs(val);
              ^

Test: builds with less warnings
Signed-off-by: Maciej Żenczykowski <maze@google.com>
---
 extensions/libxt_addrtype.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pablo Neira Ayuso April 28, 2020, 12:04 a.m. UTC | #1
I have squashed this to the previous patch.
diff mbox series

Patch

diff --git a/extensions/libxt_addrtype.c b/extensions/libxt_addrtype.c
index 27485405..5cafa219 100644
--- a/extensions/libxt_addrtype.c
+++ b/extensions/libxt_addrtype.c
@@ -5,6 +5,7 @@ 
  * This program is released under the terms of GNU GPL */
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <xtables.h>
 #include <linux/netfilter/xt_addrtype.h>