mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 22:07:19 +02:00
main/ppp: fix build with gcc15
This commit is contained in:
parent
54a5a2bb5e
commit
de0bf50b73
75
main/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch
Normal file
75
main/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From 05361692ee7d6260ce5c04c9fa0e5a1aa7565323 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||||||
|
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
|
||||||
|
|
||||||
|
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
||||||
|
---
|
||||||
|
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;
|
||||||
|
--
|
||||||
|
2.50.1
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
From fb769c380eeacf23b64cb3bf7860ba49a0e0eed5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Tue, 8 Apr 2025 00:15:57 -0700
|
||||||
|
Subject: [PATCH] pppd: Fix building session.c with GCC 15 (#553)
|
||||||
|
|
||||||
|
Fixed building with GCC 15 which defaults to C23
|
||||||
|
and find conflicting declration of getspnam() here
|
||||||
|
with the one provided by shadow.h (extern struct spwd *getspnam (const char *__name);)
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
../../ppp-2.5.2/pppd/session.c: In function 'session_start':
|
||||||
|
../../ppp-2.5.2/pppd/session.c:185:18: error: conflicting types for 'getspnam'; have 'struct spwd *(void)'
|
||||||
|
185 | struct spwd *getspnam();
|
||||||
|
| ^~~~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
pppd/session.c | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pppd/session.c b/pppd/session.c
|
||||||
|
index f08d8e1..9cc7538 100644
|
||||||
|
--- a/pppd/session.c
|
||||||
|
+++ b/pppd/session.c
|
||||||
|
@@ -182,7 +182,6 @@ session_start(const int flags, const char *user, const char *passwd, const char
|
||||||
|
char *cbuf;
|
||||||
|
#ifdef HAVE_SHADOW_H
|
||||||
|
struct spwd *spwd;
|
||||||
|
- struct spwd *getspnam();
|
||||||
|
long now = 0;
|
||||||
|
#endif /* #ifdef HAVE_SHADOW_H */
|
||||||
|
#endif /* #ifdef PPP_WITH_PAM */
|
||||||
|
--
|
||||||
|
2.50.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
pkgname=ppp
|
pkgname=ppp
|
||||||
pkgver=2.5.2
|
pkgver=2.5.2
|
||||||
pkgrel=0
|
pkgrel=1
|
||||||
pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
|
pkgdesc="A daemon which implements the PPP protocol for dial-up networking"
|
||||||
url="https://ppp.samba.org/"
|
url="https://ppp.samba.org/"
|
||||||
arch="all"
|
arch="all"
|
||||||
@ -43,6 +43,8 @@ subpackages="
|
|||||||
$pkgname-daemon
|
$pkgname-daemon
|
||||||
"
|
"
|
||||||
source="https://download.samba.org/pub/ppp/ppp-$pkgver.tar.gz
|
source="https://download.samba.org/pub/ppp/ppp-$pkgver.tar.gz
|
||||||
|
0001-pppdump-Fixed-building-with-GCC-15-548.patch
|
||||||
|
0002-pppd-Fix-building-session.c-with-GCC-15-553.patch
|
||||||
0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
|
0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
|
||||||
fix-paths.patch
|
fix-paths.patch
|
||||||
musl-fix-headers.patch
|
musl-fix-headers.patch
|
||||||
@ -190,6 +192,8 @@ openrc() {
|
|||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
2c49d411818632a750f52b187c0ee421e9fcc1530c717abacce61e76aa8b296ce09fb142bc202696c0e0ac5570dd12ee649267921b756b6572ae514ce961d1e6 ppp-2.5.2.tar.gz
|
2c49d411818632a750f52b187c0ee421e9fcc1530c717abacce61e76aa8b296ce09fb142bc202696c0e0ac5570dd12ee649267921b756b6572ae514ce961d1e6 ppp-2.5.2.tar.gz
|
||||||
|
4c857854e7b620d47e06728b67c8ba5294e37d7ca3832857bf05744ae3999fdbbefe5d80d30e629be8253546adbfa44bdf883e9011d081d51fc14c96ad74e955 0001-pppdump-Fixed-building-with-GCC-15-548.patch
|
||||||
|
37b2846135d3c4d66cc715508f2df924ea9e496891fcb06b53f467c210516262dbcac5e3de215910475e9398f7a680193c12b7ab99d5bfac2b7edcd484062844 0002-pppd-Fix-building-session.c-with-GCC-15-553.patch
|
||||||
3d2c9113ed2350e66192a49d4b3c25268ef542825a2324ddfb65263bb8b2082db18ed9e8d28c1ce65c3ec5805b6a73cba2c4dbae402f02b6123684f527baba97 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
|
3d2c9113ed2350e66192a49d4b3c25268ef542825a2324ddfb65263bb8b2082db18ed9e8d28c1ce65c3ec5805b6a73cba2c4dbae402f02b6123684f527baba97 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
|
||||||
f8ad85423ccf19a6cea66e9debea81dc1842bf499b279b77c058cc2ff10aae7f48c3430a63050b97c4f535f5dcca449261fc7476f90cb2d30dfca9359490d6bd fix-paths.patch
|
f8ad85423ccf19a6cea66e9debea81dc1842bf499b279b77c058cc2ff10aae7f48c3430a63050b97c4f535f5dcca449261fc7476f90cb2d30dfca9359490d6bd fix-paths.patch
|
||||||
8efb0750fb64cc6cbb3e5fce4a79e842db3c7fd08c3c1899cda4201a80f9ec7a4c88d88be833579b9470c1d851f01fbf2cd82b51912ebc4f05bbb168f6e73bc3 musl-fix-headers.patch
|
8efb0750fb64cc6cbb3e5fce4a79e842db3c7fd08c3c1899cda4201a80f9ec7a4c88d88be833579b9470c1d851f01fbf2cd82b51912ebc4f05bbb168f6e73bc3 musl-fix-headers.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user