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