From a37bd5e070a0a11d03522a12b5d2b9a2647f7bbb Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 1 Feb 2018 23:18:46 -0200 Subject: lib: fix more warnings on *BSD * zebra/kernel_socket.c: include "rt.h" to provide the prototypes of kernel_init() and kernel_terminate(); * lib/prefix.h: remove the deprecation warning whenever ETHER_ADDR_LEN is used. isisd uses the ETHER_HDR_LEN constant which is defined in terms of ETHER_ADDR_LEN in the *BSD system headers. So, when building FRR on *BSD, we were getting several warnings because we were using ETHER_ADDR_LEN indirectly; * lib/command_lex.l, lib/defun_lex.l: ignore other harmless warnings; * lib/spf_backoff.c: cast 'tv->tv_usec' to 'long int' before printing. Signed-off-by: Renato Westphal --- lib/spf_backoff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/spf_backoff.c') diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c index 92b7620eda..d7907fafdf 100644 --- a/lib/spf_backoff.c +++ b/lib/spf_backoff.c @@ -205,7 +205,7 @@ static const char *timeval_format(struct timeval *tv) size_t offset = strlen(timebuf); snprintf(timebuf + offset, sizeof(timebuf) - offset, ".%ld", - tv->tv_usec); + (long int)tv->tv_usec); return timebuf; } -- cgit v1.2.3