Commit 1cc4f76a authored by ghpzin's avatar ghpzin
Browse files

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();
      |      ^~~~~~~~~
```
parent 48449559
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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"