summaryrefslogtreecommitdiffstats
path: root/net-dialup/ppp/files/ppp-2.4.7-musl.diff
blob: 8b75727a1eaaa6fd52ddb4ecd4342a5b8be2249e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
diff -ur ppp-2.4.7.orig/include/linux/ppp_defs.h ppp-2.4.7/include/linux/ppp_defs.h
--- ppp-2.4.7.orig/include/linux/ppp_defs.h	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/include/linux/ppp_defs.h	2015-05-20 12:38:46.739983089 +0000
@@ -50,6 +50,10 @@
 #ifndef _PPP_DEFS_H_
 #define _PPP_DEFS_H_
 
+#ifndef __P
+# define __P(x) x
+#endif
+
 /*
  * The basic PPP frame.
  */
diff -ur ppp-2.4.7.orig/include/net/ppp_defs.h ppp-2.4.7/include/net/ppp_defs.h
--- ppp-2.4.7.orig/include/net/ppp_defs.h	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/include/net/ppp_defs.h	2015-05-20 12:38:46.739983089 +0000
@@ -38,6 +38,8 @@
 #ifndef _PPP_DEFS_H_
 #define _PPP_DEFS_H_
 
+#include <sys/time.h>
+
 /*
  * The basic PPP frame.
  */
diff -ur ppp-2.4.7.orig/pppd/Makefile.linux ppp-2.4.7/pppd/Makefile.linux
--- ppp-2.4.7.orig/pppd/Makefile.linux	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/Makefile.linux	2015-05-20 12:38:46.739983089 +0000
@@ -126,7 +126,7 @@
 endif
 
 ifdef USE_LIBUTIL
-CFLAGS	+= -DHAVE_LOGWTMP=1
+#CFLAGS	+= -DHAVE_LOGWTMP=1
 LIBS	+= -lutil
 endif
 
diff -ur ppp-2.4.7.orig/pppd/magic.h ppp-2.4.7/pppd/magic.h
--- ppp-2.4.7.orig/pppd/magic.h	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/magic.h	2015-05-20 12:38:46.739983089 +0000
@@ -42,6 +42,10 @@
  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
  */
 
+#ifndef __P
+# define __P(x) x
+#endif
+
 void magic_init __P((void));	/* Initialize the magic number generator */
 u_int32_t magic __P((void));	/* Returns the next magic number */
 
diff -ur ppp-2.4.7.orig/pppd/plugins/rp-pppoe/config.h ppp-2.4.7/pppd/plugins/rp-pppoe/config.h
--- ppp-2.4.7.orig/pppd/plugins/rp-pppoe/config.h	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/plugins/rp-pppoe/config.h	2015-05-20 12:38:46.739983089 +0000
@@ -101,9 +101,6 @@
 /* Define if you have the <netpacket/packet.h> header file.  */
 #define HAVE_NETPACKET_PACKET_H 1
 
-/* Define if you have the <sys/cdefs.h> header file.  */
-#define HAVE_SYS_CDEFS_H 1
-
 /* Define if you have the <sys/dlpi.h> header file.  */
 /* #undef HAVE_SYS_DLPI_H */
 
diff -ur ppp-2.4.7.orig/pppd/plugins/rp-pppoe/if.c ppp-2.4.7/pppd/plugins/rp-pppoe/if.c
--- ppp-2.4.7.orig/pppd/plugins/rp-pppoe/if.c	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/plugins/rp-pppoe/if.c	2015-05-20 12:38:46.739983089 +0000
@@ -30,10 +30,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
diff -ur ppp-2.4.7.orig/pppd/plugins/rp-pppoe/plugin.c ppp-2.4.7/pppd/plugins/rp-pppoe/plugin.c
--- ppp-2.4.7.orig/pppd/plugins/rp-pppoe/plugin.c	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/plugins/rp-pppoe/plugin.c	2015-05-20 12:38:46.739983089 +0000
@@ -46,7 +46,6 @@
 #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 -ur ppp-2.4.7.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c ppp-2.4.7/pppd/plugins/rp-pppoe/pppoe-discovery.c
--- ppp-2.4.7.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/plugins/rp-pppoe/pppoe-discovery.c	2015-05-20 12:38:46.739983089 +0000
@@ -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 @@
 	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 -ur ppp-2.4.7.orig/pppd/plugins/rp-pppoe/pppoe.h ppp-2.4.7/pppd/plugins/rp-pppoe/pppoe.h
--- ppp-2.4.7.orig/pppd/plugins/rp-pppoe/pppoe.h	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/plugins/rp-pppoe/pppoe.h	2015-05-20 12:38:46.739983089 +0000
@@ -39,10 +39,6 @@
 #error Unknown method for accessing raw Ethernet frames
 #endif
 
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -86,19 +82,6 @@
 
 #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
 #define ETH_PPPOE_SESSION   0x8864
diff -ur ppp-2.4.7.orig/pppd/sys-linux.c ppp-2.4.7/pppd/sys-linux.c
--- ppp-2.4.7.orig/pppd/sys-linux.c	2014-08-09 12:31:39.000000000 +0000
+++ ppp-2.4.7/pppd/sys-linux.c	2015-05-20 12:39:38.269983011 +0000
@@ -73,7 +73,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/time.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/utsname.h>
@@ -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>