From 1cc4f76aa7f7d12cf0d3a1b8125bad5c2b38900a Mon Sep 17 00:00:00 2001 From: ghpzin Date: Tue, 16 Sep 2025 18:32:32 +0300 Subject: [PATCH] ppp: fix build with gcc15 - add patch from merged upstream PR: https://www.github.com/ppp-project/ppp/pull/548 Fixes build failure with gcc15: ``` pppdump.c:81:9: error: too many arguments to function 'dumplog'; expected 0, have 1 81 | dumplog(stdin); | ^~~~~~~ ~~~~~ pppdump.c:45:6: note: declared here 45 | void dumplog(); | ^~~~~~~ pppdump.c:90:17: error: too many arguments to function 'dumpppp'; expected 0, have 1 90 | dumpppp(f); | ^~~~~~~ ~ pppdump.c:46:6: note: declared here 46 | void dumpppp(); | ^~~~~~~ pppdump.c:92:17: error: too many arguments to function 'dumplog'; expected 0, have 1 92 | dumplog(f); | ^~~~~~~ ~ pppdump.c:45:6: note: declared here 45 | void dumplog(); | ^~~~~~~ pppdump.c: In function 'dumplog': pppdump.c:102:1: error: number of arguments doesn't match prototype 102 | { | ^ pppdump.c:45:6: error: prototype declaration 45 | void dumplog(); | ^~~~~~~ pppdump.c:175:13: error: too many arguments to function 'show_time'; expected 0, have 2 175 | show_time(f, c); | ^~~~~~~~~ ~ pppdump.c:47:6: note: declared here 47 | void show_time(); | ^~~~~~~~~ pppdump.c: In function 'dumpppp': pppdump.c:246:1: error: number of arguments doesn't match prototype 246 | { | ^ pppdump.c:46:6: error: prototype declaration 46 | void dumpppp(); | ^~~~~~~ pppdump.c:369:13: error: too many arguments to function 'show_time'; expected 0, have 2 369 | show_time(f, c); | ^~~~~~~~~ ~ pppdump.c:47:6: note: declared here 47 | void show_time(); | ^~~~~~~~~ pppdump.c: In function 'show_time': pppdump.c:381:1: error: number of arguments doesn't match prototype 381 | { | ^ pppdump.c:47:6: error: prototype declaration 47 | void show_time(); | ^~~~~~~~~ ``` --- pkgs/by-name/pp/ppp/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/pp/ppp/package.nix b/pkgs/by-name/pp/ppp/package.nix index 280fa0522e89..b49ba381d536 100644 --- a/pkgs/by-name/pp/ppp/package.nix +++ b/pkgs/by-name/pp/ppp/package.nix @@ -2,6 +2,7 @@ autoreconfHook, bash, fetchFromGitHub, + fetchpatch, lib, libpcap, libxcrypt, @@ -25,6 +26,15 @@ stdenv.mkDerivation rec { hash = "sha256-NV8U0F8IhHXn0YuVbfFr992ATQZaXA16bb5hBIwm9Gs="; }; + patches = [ + # Fix build with gcc15 + # https://github.com/ppp-project/ppp/pull/548 + (fetchpatch { + url = "https://github.com/ppp-project/ppp/commit/05361692ee7d6260ce5c04c9fa0e5a1aa7565323.patch"; + hash = "sha256-ybuWyA1t9IJ1Sg06a0b0tin4qssr0qzmenfGoA1X0BE="; + }) + ]; + configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc"