]> git.ozlabs.org Git - ppp.git/commit
pppd/crypto: Fix gcc 14 build (#524)
authornasbdh9 <nabsdh9@gmail.com>
Tue, 15 Oct 2024 02:53:48 +0000 (10:53 +0800)
committerGitHub <noreply@github.com>
Tue, 15 Oct 2024 02:53:48 +0000 (13:53 +1100)
commitac269dbf7c142371cd975c775c6171707ac4dde8
tree7f27519d74ec766ccdaf874cce78a819775c3896
parentff28c309676f7b5040a2aa845b950821c0760639
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 '<stdio.h>' or provide a declaration of 'vsnprintf'
   40 | #include "crypto-priv.h"
  +++ |+#include <stdio.h>
   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);
      |                          ^~~
<built-in>: note: built-in 'vsnprintf' declared here

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
pppd/crypto.c