--- 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