From: nasbdh9 Date: Tue, 15 Oct 2024 02:53:48 +0000 (+0800) Subject: pppd/crypto: Fix gcc 14 build (#524) X-Git-Tag: v2.5.2~14 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=ac269dbf7c142371cd975c775c6171707ac4dde8;p=ppp.git pppd/crypto: Fix gcc 14 build (#524) Fix this: crypto.c: In function 'PPP_crypto_error': crypto.c:178:11: error: implicit declaration of function 'vsnprintf' [-Wimplicit-function-declaration] 178 | off = vsnprintf(buf, len, fmt, args); | ^~~~~~~~~ crypto.c:41:1: note: include '' or provide a declaration of 'vsnprintf' 40 | #include "crypto-priv.h" +++ |+#include 41 | crypto.c:178:26: warning: 'vsnprintf' argument 2 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 178 | off = vsnprintf(buf, len, fmt, args); | ^~~ : note: built-in 'vsnprintf' declared here Signed-off-by: Tan Zien --- diff --git a/pppd/crypto.c b/pppd/crypto.c index 054ee13..3576afd 100644 --- a/pppd/crypto.c +++ b/pppd/crypto.c @@ -34,6 +34,7 @@ #include #include +#include #include "pppd.h" #include "crypto.h" @@ -243,7 +244,6 @@ int PPP_crypto_deinit() } #ifdef UNIT_TEST -#include int debug; int error_count;