Skip to contentSkip to conversation

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

PATCH In review Maciej Żenczykowski 2 participants 2 messages Apr 21, 2020 – Apr 28, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

From: Maciej Żenczykowski <[email protected]>

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

---
 extensions/libxt_addrtype.c | 1 +
 1 file changed, 1 insertion(+)
extensions/libxt_addrtype.c +1 -0
index 27485405..5cafa219 100644
@@ -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>
 
Signature · 1 line
2.26.1.301.g55bc3eb7cb9-goog