Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39963master
parent
0f474633e1
commit
7fa3fe6741
@ -0,0 +1,11 @@ |
||||
--- a/pppd/plugins/rp-pppoe/config.h
|
||||
+++ b/pppd/plugins/rp-pppoe/config.h
|
||||
@@ -102,7 +102,7 @@
|
||||
#define HAVE_NETPACKET_PACKET_H 1
|
||||
|
||||
/* Define if you have the <sys/cdefs.h> header file. */
|
||||
-#define HAVE_SYS_CDEFS_H 1
|
||||
+/* #undef HAVE_SYS_CDEFS_H */
|
||||
|
||||
/* Define if you have the <sys/dlpi.h> header file. */
|
||||
/* #undef HAVE_SYS_DLPI_H */
|
@ -0,0 +1,23 @@ |
||||
--- a/pppd/pppd.h
|
||||
+++ b/pppd/pppd.h
|
||||
@@ -67,6 +67,9 @@
|
||||
#define volatile
|
||||
#endif
|
||||
|
||||
+#undef __P
|
||||
+#define __P(args) args
|
||||
+
|
||||
#ifdef INET6
|
||||
#include "eui64.h"
|
||||
#endif
|
||||
--- 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 "pppd.h"
|
||||
+
|
||||
void magic_init __P((void)); /* Initialize the magic number generator */
|
||||
u_int32_t magic __P((void)); /* Returns the next magic number */
|
||||
|
@ -0,0 +1,40 @@ |
||||
--- a/pppd/sys-linux.c
|
||||
+++ b/pppd/sys-linux.c
|
||||
@@ -73,12 +73,12 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
-#include <sys/errno.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/sysmacros.h>
|
||||
|
||||
+#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
@@ -102,22 +102,15 @@
|
||||
#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>
|
||||
|
||||
+#include <linux/sockios.h>
|
||||
#include <linux/ppp_defs.h>
|
||||
#include <linux/if_ppp.h>
|
||||
|
@ -0,0 +1,11 @@ |
||||
--- a/pppd/sha1.c
|
||||
+++ b/pppd/sha1.c
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <netinet/in.h> /* htonl() */
|
||||
-#include <net/ppp_defs.h>
|
||||
+#include "pppd.h"
|
||||
#include "sha1.h"
|
||||
|
||||
static void
|
@ -0,0 +1,100 @@ |
||||
--- a/pppd/plugins/rp-pppoe/plugin.c
|
||||
+++ b/pppd/plugins/rp-pppoe/plugin.c
|
||||
@@ -46,9 +46,9 @@ 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_ether.h>
|
||||
#include <linux/if_ppp.h>
|
||||
#include <linux/if_pppox.h>
|
||||
|
||||
--- a/pppd/plugins/rp-pppoe/pppoe.h
|
||||
+++ b/pppd/plugins/rp-pppoe/pppoe.h
|
||||
@@ -86,17 +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 */
|
||||
--- a/pppd/plugins/rp-pppoe/if.c
|
||||
+++ b/pppd/plugins/rp-pppoe/if.c
|
||||
@@ -31,7 +31,7 @@ static char const RCSID[] =
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NET_ETHERNET_H
|
||||
-#include <net/ethernet.h>
|
||||
+#include <linux/if_ether.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ASM_TYPES_H
|
||||
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
||||
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "pppoe.h"
|
||||
+#include "pppd/pppd.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@@ -27,10 +28,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
|
||||
@@ -717,6 +714,23 @@ char *xstrdup(const char *s)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+void
|
||||
+error(char *fmt, ...)
|
||||
+{
|
||||
+ va_list pvar;
|
||||
+
|
||||
+#if defined(__STDC__)
|
||||
+ va_start(pvar, fmt);
|
||||
+#else
|
||||
+ char *fmt;
|
||||
+ va_start(pvar);
|
||||
+ fmt = va_arg(pvar, char *);
|
||||
+#endif
|
||||
+
|
||||
+ fprintf(stderr, fmt, pvar);
|
||||
+ va_end(pvar);
|
||||
+}
|
||||
+
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: pppoe-discovery [options]\n");
|
||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
||||
@@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug
|
||||
$(CC) -o pppoe-discovery pppoe-discovery.o debug.o
|
||||
|
||||
pppoe-discovery.o: pppoe-discovery.c
|
||||
- $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
|
||||
+ $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
|
||||
|
||||
debug.o: debug.c
|
||||
$(CC) $(CFLAGS) -c -o debug.o debug.c
|
@ -0,0 +1,11 @@ |
||||
--- a/pppd/plugins/pptp/pptp.c
|
||||
+++ b/pppd/plugins/pptp/pptp.c
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include "pptp_callmgr.h"
|
||||
#include <net/if.h>
|
||||
-#include <net/ethernet.h>
|
||||
+#include <linux/if_ether.h>
|
||||
#include <linux/if_pppox.h>
|
||||
|
||||
#include <stdio.h>
|
Loading…
Reference in new issue