Skip to content

Commit

Permalink
pppd/crypto: Fix gcc 14 build (#524)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nasbdh9 authored Oct 15, 2024
1 parent ff28c30 commit ac269db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pppd/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#include "pppd.h"
#include "crypto.h"
Expand Down Expand Up @@ -243,7 +244,6 @@ int PPP_crypto_deinit()
}

#ifdef UNIT_TEST
#include <stdio.h>

int debug;
int error_count;
Expand Down

0 comments on commit ac269db

Please sign in to comment.