From: Khem Raj Date: Sat, 15 Mar 2025 19:43:57 +0000 (-0700) Subject: ppp: Replace K&R style C declarations X-Git-Tag: 2025-04-walnascar~224 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acc41d7f912bf9d3ee142a02d0b64cf9ff6f226e;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git ppp: Replace K&R style C declarations GCC uses C23 standard by default which does not allow K&R style declarations Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch new file mode 100644 index 00000000000..2a3b3cc84ab --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch @@ -0,0 +1,75 @@ +From 44a766a3d086f10cb584a0c423e5bed6af2e3615 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Thu, 27 Feb 2025 23:00:16 +0100 +Subject: [PATCH] pppdump: Fixed building with GCC 15 (#548) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 15 defaults to C23 which does not allow K&R declarations. + +Credit Yaakov Selkowitz in: +https://src.fedoraproject.org/rpms/ppp/pull-request/12 + +Upstream-Status: Backport [https://github.com/ppp-project/ppp/pull/548] + +Signed-off-by: Jaroslav Å karvada +Signed-off-by: Khem Raj +--- + pppdump/pppdump.c | 20 +++++++------------- + 1 file changed, 7 insertions(+), 13 deletions(-) + +diff --git a/pppdump/pppdump.c b/pppdump/pppdump.c +index c24208a..1534036 100644 +--- a/pppdump/pppdump.c ++++ b/pppdump/pppdump.c +@@ -42,14 +42,12 @@ int tot_sent, tot_rcvd; + extern int optind; + extern char *optarg; + +-void dumplog(); +-void dumpppp(); +-void show_time(); ++void dumplog(FILE *); ++void dumpppp(FILE *); ++void show_time(FILE *, int); + + int +-main(ac, av) +- int ac; +- char **av; ++main(int ac, char **av) + { + int i; + char *p; +@@ -97,8 +95,7 @@ main(ac, av) + } + + void +-dumplog(f) +- FILE *f; ++dumplog(FILE *f) + { + int c, n, k, col; + int nb, c2; +@@ -241,8 +238,7 @@ struct pkt { + unsigned char dbuf[8192]; + + void +-dumpppp(f) +- FILE *f; ++dumpppp(FILE *f) + { + int c, n, k; + int nb, nl, dn, proto, rv; +@@ -375,9 +371,7 @@ dumpppp(f) + } + + void +-show_time(f, c) +- FILE *f; +- int c; ++show_time(FILE *f, int c) + { + time_t t; + int n; diff --git a/meta/recipes-connectivity/ppp/ppp_2.5.2.bb b/meta/recipes-connectivity/ppp/ppp_2.5.2.bb index 9ea99cc15a3..5565ce51cff 100644 --- a/meta/recipes-connectivity/ppp/ppp_2.5.2.bb +++ b/meta/recipes-connectivity/ppp/ppp_2.5.2.bb @@ -23,6 +23,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ file://ppp_on_boot \ file://provider \ file://ppp@.service \ + file://0001-pppdump-Fixed-building-with-GCC-15-548.patch \ " SRC_URI[sha256sum] = "47da358de54a10cb10bf6ff2cf9b1c03c0d3555518f6182e8f701b8e55733cb2"