summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Rostecki <mrostecki@opensuse.org>2019-11-21 13:33:32 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-11-21 14:40:24 +0100
commit3ecea86f855dd964c95b0481c9010ae200e90560 (patch)
treee507223265617e35e0cd7b82e9933cfb7cb40f83
parent3a7bdd02207f7ae6cd74af8c313d6d0f8f66f4be (diff)
mnl: Fix -Wimplicit-function-declaration warnings
This change fixes the following warnings: mnl.c: In function ‘mnl_nft_flowtable_add’: mnl.c:1442:14: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration] dev_array = calloc(len, sizeof(char *)); ^~~~~~ mnl.c:1442:14: warning: incompatible implicit declaration of built-in function ‘calloc’ mnl.c:1442:14: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’ mnl.c:1449:2: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] free(dev_array); ^~~~ mnl.c:1449:2: warning: incompatible implicit declaration of built-in function ‘free’ mnl.c:1449:2: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’ Signed-off-by: Michal Rostecki <mrostecki@opensuse.org> Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/mnl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mnl.c b/src/mnl.c
index fdba0af8..aa5b0b46 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -30,6 +30,7 @@
#include <arpa/inet.h>
#include <fcntl.h>
#include <errno.h>
+#include <stdlib.h>
#include <utils.h>
#include <nftables.h>