1 --- a/pppd/plugins/rp-pppoe/plugin.c
2 +++ b/pppd/plugins/rp-pppoe/plugin.c
3 @@ -46,9 +46,9 @@ static char const RCSID[] =
7 -#include <net/ethernet.h>
8 #include <net/if_arp.h>
9 #include <linux/ppp_defs.h>
10 +#include <linux/if_ether.h>
11 #include <linux/if_ppp.h>
12 #include <linux/if_pppox.h>
14 --- a/pppd/plugins/rp-pppoe/pppoe.h
15 +++ b/pppd/plugins/rp-pppoe/pppoe.h
16 @@ -86,17 +86,6 @@ typedef unsigned long UINT32_t;
18 #include <netinet/in.h>
20 -#ifdef HAVE_NETINET_IF_ETHER_H
21 -#include <sys/types.h>
23 -#ifdef HAVE_SYS_SOCKET_H
24 -#include <sys/socket.h>
26 -#ifndef HAVE_SYS_DLPI_H
27 -#include <netinet/if_ether.h>
33 /* Ethernet frame types according to RFC 2516 */
34 --- a/pppd/plugins/rp-pppoe/if.c
35 +++ b/pppd/plugins/rp-pppoe/if.c
36 @@ -31,7 +31,7 @@ static char const RCSID[] =
39 #ifdef HAVE_NET_ETHERNET_H
40 -#include <net/ethernet.h>
41 +#include <linux/if_ether.h>
44 #ifdef HAVE_ASM_TYPES_H
45 --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
46 +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
51 +#include "pppd/pppd.h"
56 #include <linux/if_packet.h>
59 -#ifdef HAVE_NET_ETHERNET_H
60 -#include <net/ethernet.h>
63 #ifdef HAVE_ASM_TYPES_H
64 #include <asm/types.h>
66 @@ -717,6 +714,23 @@ char *xstrdup(const char *s)
71 +error(char *fmt, ...)
75 +#if defined(__STDC__)
76 + va_start(pvar, fmt);
80 + fmt = va_arg(pvar, char *);
83 + fprintf(stderr, fmt, pvar);
89 fprintf(stderr, "Usage: pppoe-discovery [options]\n");
90 --- a/pppd/plugins/rp-pppoe/Makefile.linux
91 +++ b/pppd/plugins/rp-pppoe/Makefile.linux
92 @@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug
93 $(CC) -o pppoe-discovery pppoe-discovery.o debug.o
95 pppoe-discovery.o: pppoe-discovery.c
96 - $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
97 + $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
100 $(CC) $(CFLAGS) -c -o debug.o debug.c