diff options
author | Will Dietz <w@wdtz.org> | 2017-09-22 13:45:03 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:47 -0600 |
commit | 08e70f7a0c45df7f110994b7ba27214d5b60ca25 (patch) | |
tree | 46335b53c0468e820b24b01794cd84497c2c3d88 /pkgs | |
parent | 77c58c9de14bac5b22ce20e7a704059c12d89c46 (diff) | |
download | nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.tar nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.tar.gz nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.tar.bz2 nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.tar.lz nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.tar.xz nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.tar.zst nixpkgs-08e70f7a0c45df7f110994b7ba27214d5b60ca25.zip |
ppp: grab alpine patch, fix build on musl
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/networking/ppp/default.nix | 1 | ||||
-rw-r--r-- | pkgs/tools/networking/ppp/musl-fix-headers.patch | 137 |
2 files changed, 138 insertions, 0 deletions
diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index d07770260ff..570e85c3281 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -23,6 +23,7 @@ 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"; }) + ./musl-fix-headers.patch ]; buildInputs = [ libpcap ]; diff --git a/pkgs/tools/networking/ppp/musl-fix-headers.patch b/pkgs/tools/networking/ppp/musl-fix-headers.patch new file mode 100644 index 00000000000..d24f6289684 --- /dev/null +++ b/pkgs/tools/networking/ppp/musl-fix-headers.patch @@ -0,0 +1,137 @@ +diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h +index b06eda5..dafa36c 100644 +--- a/include/net/ppp_defs.h ++++ b/include/net/ppp_defs.h +@@ -38,6 +38,8 @@ + #ifndef _PPP_DEFS_H_ + #define _PPP_DEFS_H_ + ++#include <sys/time.h> ++ + /* + * The basic PPP frame. + */ +diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux +index a74c914..7acd2cf 100644 +--- a/pppd/Makefile.linux ++++ b/pppd/Makefile.linux +@@ -126,7 +126,7 @@ LIBS += -lcrypt + endif + + ifdef USE_LIBUTIL +-CFLAGS += -DHAVE_LOGWTMP=1 ++#CFLAGS += -DHAVE_LOGWTMP=1 + LIBS += -lutil + endif + +diff --git a/pppd/magic.h b/pppd/magic.h +index c81213b..305aece 100644 +--- a/pppd/magic.h ++++ b/pppd/magic.h +@@ -42,6 +42,8 @@ + * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $ + */ + ++#include <sys/cdefs.h> ++ + void magic_init __P((void)); /* Initialize the magic number generator */ + u_int32_t magic __P((void)); /* Returns the next magic number */ + +diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/rp-pppoe/if.c +index 91e9a57..9c0fac3 100644 +--- a/pppd/plugins/rp-pppoe/if.c ++++ b/pppd/plugins/rp-pppoe/if.c +@@ -30,10 +30,6 @@ static char const RCSID[] = + #include <linux/if_packet.h> + #endif + +-#ifdef HAVE_NET_ETHERNET_H +-#include <net/ethernet.h> +-#endif +- + #ifdef HAVE_ASM_TYPES_H + #include <asm/types.h> + #endif +diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c +index a8c2bb4..ca34d79 100644 +--- a/pppd/plugins/rp-pppoe/plugin.c ++++ b/pppd/plugins/rp-pppoe/plugin.c +@@ -46,7 +46,6 @@ static char const RCSID[] = + #include <unistd.h> + #include <fcntl.h> + #include <signal.h> +-#include <net/ethernet.h> + #include <net/if_arp.h> + #include <linux/ppp_defs.h> + #include <linux/if_pppox.h> +diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c +index 3d3bf4e..b5f82d3 100644 +--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c ++++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c +@@ -27,10 +27,6 @@ + #include <linux/if_packet.h> + #endif + +-#ifdef HAVE_NET_ETHERNET_H +-#include <net/ethernet.h> +-#endif +- + #ifdef HAVE_ASM_TYPES_H + #include <asm/types.h> + #endif +@@ -55,6 +51,8 @@ void die(int status) + exit(status); + } + ++#define error(x...) fprintf(stderr, x) ++ + /* Initialize frame types to RFC 2516 values. Some broken peers apparently + 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 +--- a/pppd/plugins/rp-pppoe/pppoe.h ++++ b/pppd/plugins/rp-pppoe/pppoe.h +@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t; + + #include <netinet/in.h> + +-#ifdef HAVE_NETINET_IF_ETHER_H +-#include <sys/types.h> +- +-#ifdef HAVE_SYS_SOCKET_H +-#include <sys/socket.h> +-#endif +-#ifndef HAVE_SYS_DLPI_H +-#include <netinet/if_ether.h> +-#endif +-#endif +- +- + + /* Ethernet frame types according to RFC 2516 */ + #define ETH_PPPOE_DISCOVERY 0x8863 +diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c +index 6d71530..86d224e 100644 +--- a/pppd/sys-linux.c ++++ b/pppd/sys-linux.c +@@ -102,19 +102,11 @@ + #define MAX_ADDR_LEN 7 + #endif + +-#if __GLIBC__ >= 2 + #include <asm/types.h> /* glibc 2 conflicts with linux/types.h */ + #include <net/if.h> + #include <net/if_arp.h> + #include <net/route.h> + #include <netinet/if_ether.h> +-#else +-#include <linux/types.h> +-#include <linux/if.h> +-#include <linux/if_arp.h> +-#include <linux/route.h> +-#include <linux/if_ether.h> +-#endif + #include <netinet/in.h> + #include <arpa/inet.h> + |