diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index 570e85c3281..96016ee7b4f 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -23,15 +23,30 @@ stdenv.mkDerivation rec { url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/rc_mksid-no-buffer-overflow?h=debian/2.4.7-1%2b4"; sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh"; }) + (fetchurl { + url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/0016-pppoe-include-netinet-in.h-before-linux-in.h.patch"; + sha256 = "1xnmqn02kc6g5y84xynjwnpv9cvrfn3nyv7h7r8j8xi7qf2aj4q8"; + }) ./musl-fix-headers.patch ]; buildInputs = [ libpcap ]; + postPatch = '' + # strip is not found when cross compiling with seemingly no way to point + # make to the right place, fixup phase will correctly strip + # everything anyway so we remove it from the Makefiles + for file in $(find -name Makefile.linux); do + substituteInPlace "$file" --replace '$(INSTALL) -s' '$(INSTALL)' + done + ''; + installPhase = '' + runHook preInstall mkdir -p $out/bin make install install -D -m 755 scripts/{pon,poff,plog} $out/bin + runHook postInstall ''; postFixup = '' diff --git a/pkgs/tools/networking/ppp/musl-fix-headers.patch b/pkgs/tools/networking/ppp/musl-fix-headers.patch index d24f6289684..030cc97d157 100644 --- a/pkgs/tools/networking/ppp/musl-fix-headers.patch +++ b/pkgs/tools/networking/ppp/musl-fix-headers.patch @@ -89,12 +89,12 @@ index 3d3bf4e..b5f82d3 100644 use different frame types... sigh... */ diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h -index 9ab2eee..4d68147 100644 +index c4aaa6e..70aef85 100644 --- a/pppd/plugins/rp-pppoe/pppoe.h +++ b/pppd/plugins/rp-pppoe/pppoe.h -@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t; - - #include +@@ -88,18 +88,6 @@ typedef unsigned long UINT32_t; + #include + #endif -#ifdef HAVE_NETINET_IF_ETHER_H -#include @@ -108,9 +108,9 @@ index 9ab2eee..4d68147 100644 -#endif - - - /* Ethernet frame types according to RFC 2516 */ #define ETH_PPPOE_DISCOVERY 0x8863 + #define ETH_PPPOE_SESSION 0x8864 diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 6d71530..86d224e 100644 --- a/pppd/sys-linux.c