Skip to content

Commit

Permalink
ppp: add ppp_defs.h shim for musl
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyuyureka committed Feb 20, 2023
1 parent 37cc718 commit 91cfaa2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/tools/networking/ppp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, openssl
, bash
, nixosTests
, writeTextDir
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -38,6 +39,17 @@ stdenv.mkDerivation rec {
bash
];

# This can be removed when ppp 2.5.0 is released:
# https://github.com/ppp-project/ppp/commit/509f04959ad891d7f981f035ed461d51bd1f74b0
propagatedBuildInputs = lib.optional stdenv.hostPlatform.isMusl (writeTextDir "include/net/ppp_defs.h" ''
#ifndef _NET_PPP_DEFS_H
#define _NET_PPP_DEFS_H 1
#include <linux/ppp_defs.h>
#endif /* net/ppp_defs.h */
'');

postPatch = ''
for file in $(find -name Makefile.linux); do
substituteInPlace "$file" --replace '-m 4550' '-m 550'
Expand Down

0 comments on commit 91cfaa2

Please sign in to comment.