1 --- a/pppd/plugins/rp-pppoe/plugin.c
2 +++ b/pppd/plugins/rp-pppoe/plugin.c
3 @@ -46,10 +46,10 @@ 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_pppox.h>
11 +#include <linux/if_ether.h>
15 --- a/pppd/plugins/rp-pppoe/pppoe.h
16 +++ b/pppd/plugins/rp-pppoe/pppoe.h
17 @@ -86,17 +86,6 @@ typedef unsigned long UINT32_t;
19 #include <netinet/in.h>
21 -#ifdef HAVE_NETINET_IF_ETHER_H
22 -#include <sys/types.h>
24 -#ifdef HAVE_SYS_SOCKET_H
25 -#include <sys/socket.h>
27 -#ifndef HAVE_SYS_DLPI_H
28 -#include <netinet/if_ether.h>
34 /* Ethernet frame types according to RFC 2516 */
35 --- a/pppd/plugins/rp-pppoe/if.c
36 +++ b/pppd/plugins/rp-pppoe/if.c
37 @@ -31,7 +31,7 @@ static char const RCSID[] =
40 #ifdef HAVE_NET_ETHERNET_H
41 -#include <net/ethernet.h>
42 +#include <linux/if_ether.h>
45 #ifdef HAVE_ASM_TYPES_H
46 --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
47 +++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
52 +#include "pppd/pppd.h"
57 #include <linux/if_packet.h>
60 -#ifdef HAVE_NET_ETHERNET_H
61 -#include <net/ethernet.h>
64 #ifdef HAVE_ASM_TYPES_H
65 #include <asm/types.h>
67 @@ -717,6 +714,23 @@ char *xstrdup(const char *s)
72 +error(char *fmt, ...)
76 +#if defined(__STDC__)
77 + va_start(pvar, fmt);
81 + fmt = va_arg(pvar, char *);
84 + fprintf(stderr, fmt, pvar);
90 fprintf(stderr, "Usage: pppoe-discovery [options]\n");
91 --- a/pppd/plugins/rp-pppoe/Makefile.linux
92 +++ b/pppd/plugins/rp-pppoe/Makefile.linux
93 @@ -33,7 +33,7 @@ pppoe-discovery: pppoe-discovery.o debug
94 $(CC) $(CFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o
96 pppoe-discovery.o: pppoe-discovery.c
97 - $(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
98 + $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
101 $(CC) $(CFLAGS) -c -o debug.o debug.c