tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ppp: grab alpine patch, fix build on musl
Will Dietz
8 years ago
08e70f7a
77c58c9d
+138
2 changed files
expand all
collapse all
unified
split
pkgs
tools
networking
ppp
default.nix
musl-fix-headers.patch
+1
pkgs/tools/networking/ppp/default.nix
···
23
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";
24
sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh";
25
})
0
26
];
27
28
buildInputs = [ libpcap ];
···
23
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";
24
sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh";
25
})
26
+
./musl-fix-headers.patch
27
];
28
29
buildInputs = [ libpcap ];
+137
pkgs/tools/networking/ppp/musl-fix-headers.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
2
+
index b06eda5..dafa36c 100644
3
+
--- a/include/net/ppp_defs.h
4
+
+++ b/include/net/ppp_defs.h
5
+
@@ -38,6 +38,8 @@
6
+
#ifndef _PPP_DEFS_H_
7
+
#define _PPP_DEFS_H_
8
+
9
+
+#include <sys/time.h>
10
+
+
11
+
/*
12
+
* The basic PPP frame.
13
+
*/
14
+
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
15
+
index a74c914..7acd2cf 100644
16
+
--- a/pppd/Makefile.linux
17
+
+++ b/pppd/Makefile.linux
18
+
@@ -126,7 +126,7 @@ LIBS += -lcrypt
19
+
endif
20
+
21
+
ifdef USE_LIBUTIL
22
+
-CFLAGS += -DHAVE_LOGWTMP=1
23
+
+#CFLAGS += -DHAVE_LOGWTMP=1
24
+
LIBS += -lutil
25
+
endif
26
+
27
+
diff --git a/pppd/magic.h b/pppd/magic.h
28
+
index c81213b..305aece 100644
29
+
--- a/pppd/magic.h
30
+
+++ b/pppd/magic.h
31
+
@@ -42,6 +42,8 @@
32
+
* $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
33
+
*/
34
+
35
+
+#include <sys/cdefs.h>
36
+
+
37
+
void magic_init __P((void)); /* Initialize the magic number generator */
38
+
u_int32_t magic __P((void)); /* Returns the next magic number */
39
+
40
+
diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/rp-pppoe/if.c
41
+
index 91e9a57..9c0fac3 100644
42
+
--- a/pppd/plugins/rp-pppoe/if.c
43
+
+++ b/pppd/plugins/rp-pppoe/if.c
44
+
@@ -30,10 +30,6 @@ static char const RCSID[] =
45
+
#include <linux/if_packet.h>
46
+
#endif
47
+
48
+
-#ifdef HAVE_NET_ETHERNET_H
49
+
-#include <net/ethernet.h>
50
+
-#endif
51
+
-
52
+
#ifdef HAVE_ASM_TYPES_H
53
+
#include <asm/types.h>
54
+
#endif
55
+
diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
56
+
index a8c2bb4..ca34d79 100644
57
+
--- a/pppd/plugins/rp-pppoe/plugin.c
58
+
+++ b/pppd/plugins/rp-pppoe/plugin.c
59
+
@@ -46,7 +46,6 @@ static char const RCSID[] =
60
+
#include <unistd.h>
61
+
#include <fcntl.h>
62
+
#include <signal.h>
63
+
-#include <net/ethernet.h>
64
+
#include <net/if_arp.h>
65
+
#include <linux/ppp_defs.h>
66
+
#include <linux/if_pppox.h>
67
+
diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
68
+
index 3d3bf4e..b5f82d3 100644
69
+
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
70
+
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
71
+
@@ -27,10 +27,6 @@
72
+
#include <linux/if_packet.h>
73
+
#endif
74
+
75
+
-#ifdef HAVE_NET_ETHERNET_H
76
+
-#include <net/ethernet.h>
77
+
-#endif
78
+
-
79
+
#ifdef HAVE_ASM_TYPES_H
80
+
#include <asm/types.h>
81
+
#endif
82
+
@@ -55,6 +51,8 @@ void die(int status)
83
+
exit(status);
84
+
}
85
+
86
+
+#define error(x...) fprintf(stderr, x)
87
+
+
88
+
/* Initialize frame types to RFC 2516 values. Some broken peers apparently
89
+
use different frame types... sigh... */
90
+
91
+
diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
92
+
index 9ab2eee..4d68147 100644
93
+
--- a/pppd/plugins/rp-pppoe/pppoe.h
94
+
+++ b/pppd/plugins/rp-pppoe/pppoe.h
95
+
@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
96
+
97
+
#include <netinet/in.h>
98
+
99
+
-#ifdef HAVE_NETINET_IF_ETHER_H
100
+
-#include <sys/types.h>
101
+
-
102
+
-#ifdef HAVE_SYS_SOCKET_H
103
+
-#include <sys/socket.h>
104
+
-#endif
105
+
-#ifndef HAVE_SYS_DLPI_H
106
+
-#include <netinet/if_ether.h>
107
+
-#endif
108
+
-#endif
109
+
-
110
+
-
111
+
112
+
/* Ethernet frame types according to RFC 2516 */
113
+
#define ETH_PPPOE_DISCOVERY 0x8863
114
+
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
115
+
index 6d71530..86d224e 100644
116
+
--- a/pppd/sys-linux.c
117
+
+++ b/pppd/sys-linux.c
118
+
@@ -102,19 +102,11 @@
119
+
#define MAX_ADDR_LEN 7
120
+
#endif
121
+
122
+
-#if __GLIBC__ >= 2
123
+
#include <asm/types.h> /* glibc 2 conflicts with linux/types.h */
124
+
#include <net/if.h>
125
+
#include <net/if_arp.h>
126
+
#include <net/route.h>
127
+
#include <netinet/if_ether.h>
128
+
-#else
129
+
-#include <linux/types.h>
130
+
-#include <linux/if.h>
131
+
-#include <linux/if_arp.h>
132
+
-#include <linux/route.h>
133
+
-#include <linux/if_ether.h>
134
+
-#endif
135
+
#include <netinet/in.h>
136
+
#include <arpa/inet.h>
137
+