summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorMaciej ┼╗enczykowski <maze@google.com>2020-04-21 01:15:07 -0700
committerPablo Neira Ayuso <pablo@netfilter.org>2020-04-28 02:08:24 +0200
commit47b2095741fadaf21023695bbad4af39504bde57 (patch)
tree1a19e6743a4023979a100d9ce57ddaa9439fb238 /extensions
parentf2ace0cdf25a5911ac84015829d65d6050a5e82d (diff)
extensions: include strings.h for the definition of ffs()
This resolves clang compiler warnings: extensions/libext4_srcs/gen/gensrcs/external/iptables/extensions/libipt_ULOG.c:89:32: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration] printf(" --ulog-nlgroup %d", ffs(loginfo->nl_group)); ^ extensions/libext4_srcs/gen/gensrcs/external/iptables/extensions/libipt_ULOG.c:105:9: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ffs(loginfo->nl_group)); ^ 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> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libipt_ULOG.c1
-rw-r--r--extensions/libxt_addrtype.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/extensions/libipt_ULOG.c b/extensions/libipt_ULOG.c
index fafb220b..5163eea3 100644
--- a/extensions/libipt_ULOG.c
+++ b/extensions/libipt_ULOG.c
@@ -11,6 +11,7 @@
*/
#include <stdio.h>
#include <string.h>
+#include <strings.h>
#include <xtables.h>
/* For 64bit kernel / 32bit userspace */
#include <linux/netfilter_ipv4/ipt_ULOG.h>
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>