From 85865ee34963aa2fae1d0503feb9858f63ef0af7 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 28 Jul 2021 13:04:51 +0200 Subject: ax25ipd: Include for malloc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a warning about implicit declaration of malloc. gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -g -O2 -Wall -MT routing.o -MD -MP -MF .deps/routing.Tpo -c -o routing.o routing.c routing.c: In function ‘route_add’: routing.c:83:13: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration] 83 | malloc(sizeof(struct route_table_entry)); | ^~~~~~ routing.c:17:1: note: include ‘’ or provide a declaration of ‘malloc’ 16 | #include "ax25ipd.h" +++ |+#include 17 | routing.c:83:13: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 83 | malloc(sizeof(struct route_table_entry)); | ^~~~~~ routing.c:83:13: note: include ‘’ or provide a declaration of ‘malloc’ routing.c: In function ‘bcast_add’: routing.c:130:13: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 130 | malloc(sizeof(struct bcast_table_entry)); | ^~~~~~ routing.c:130:13: note: include ‘’ or provide a declaration of ‘malloc’ Signed-off-by: Ralf Baechle --- ax25ipd/routing.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ax25ipd/routing.c') diff --git a/ax25ipd/routing.c b/ax25ipd/routing.c index 6ac070a..3b08886 100644 --- a/ax25ipd/routing.c +++ b/ax25ipd/routing.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3