From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- .../ppp/patches/140-pppoe_compile_fix.patch | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 package/network/services/ppp/patches/140-pppoe_compile_fix.patch (limited to 'package/network/services/ppp/patches/140-pppoe_compile_fix.patch') diff --git a/package/network/services/ppp/patches/140-pppoe_compile_fix.patch b/package/network/services/ppp/patches/140-pppoe_compile_fix.patch new file mode 100644 index 0000000..2983a75 --- /dev/null +++ b/package/network/services/ppp/patches/140-pppoe_compile_fix.patch @@ -0,0 +1,101 @@ +--- a/pppd/plugins/rp-pppoe/plugin.c ++++ b/pppd/plugins/rp-pppoe/plugin.c +@@ -46,10 +46,10 @@ static char const RCSID[] = + #include + #include + #include +-#include + #include + #include + #include ++#include + + #ifndef _ROOT_PATH + #define _ROOT_PATH "" +--- a/pppd/plugins/rp-pppoe/pppoe.h ++++ b/pppd/plugins/rp-pppoe/pppoe.h +@@ -86,17 +86,6 @@ typedef unsigned long UINT32_t; + + #include + +-#ifdef HAVE_NETINET_IF_ETHER_H +-#include +- +-#ifdef HAVE_SYS_SOCKET_H +-#include +-#endif +-#ifndef HAVE_SYS_DLPI_H +-#include +-#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 ++#include + #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 + + #include "pppoe.h" ++#include "pppd/pppd.h" + + #ifdef HAVE_UNISTD_H + #include +@@ -27,10 +28,6 @@ + #include + #endif + +-#ifdef HAVE_NET_ETHERNET_H +-#include +-#endif +- + #ifdef HAVE_ASM_TYPES_H + #include + #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) $(CFLAGS) -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 -- cgit v1.2.3