openwrt/package/network/services/ppp/patches/103-pppd-crypto-fix-gcc-14-build.patch
Shiji Yang 3e668c6d02 ppp: update to 2.5.1
ChangeLog:
https://github.com/ppp-project/ppp/blob/ppp-2.5.1/ChangeLog

Suppressed patches:
010-use_target_for_configure.patch [1]
510-pptp_compile_fix.patch [2]
520-u_int_bsd_fix.patch [3]

Upstreamed patches:
330-retain_foreign_default_routes.patch [4]
521-remove_unused_openssl_dep.patch [5]

[1] e48a9b5de4
[2] Merged into "500-add-pptp-plugin.patch"
[3] 797cdae57c
[4] 9856f47063
[5] 59342ab622

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16605
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-12 15:53:06 +02:00

43 lines
1.2 KiB
Diff

From: Tan Zien <nabsdh9@gmail.com>
Date: Tue, 1 Oct 2024 10:38:45 +0800
Subject: [PATCH] pppd/crypto: fix gcc 14 build
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/pppd/crypto.c
+++ b/pppd/crypto.c
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#include "pppd.h"
#include "crypto.h"
@@ -247,7 +248,6 @@ int PPP_crypto_deinit()
}
#ifdef UNIT_TEST
-#include <stdio.h>
int debug;
int error_count;