diff -up rp-pppoe-3.12/src/if.c.than rp-pppoe-3.12/src/if.c --- rp-pppoe-3.12/src/if.c.than 2017-07-25 11:04:53.780466912 +0200 +++ rp-pppoe-3.12/src/if.c 2017-07-25 11:05:35.951885962 +0200 @@ -20,6 +20,12 @@ static char const RCSID[] = #include "pppoe.h" +#if defined(HAVE_LINUX_IF_H) +#include +#elif defined(HAVE_NET_IF_H) +#include +#endif + #ifdef HAVE_UNISTD_H #include #endif diff -up rp-pppoe-3.12/src/plugin.c.than rp-pppoe-3.12/src/plugin.c --- rp-pppoe-3.12/src/plugin.c.than 2017-07-25 11:05:50.145353868 +0200 +++ rp-pppoe-3.12/src/plugin.c 2017-07-25 11:07:00.068732535 +0200 @@ -49,6 +49,11 @@ static char const RCSID[] = #include #include #include +#if defined(HAVE_LINUX_IF_H) +#include +#elif defined(HAVE_NET_IF_H) +#include +#endif #include #include #include diff -up rp-pppoe-3.12/src/pppoe.h.than rp-pppoe-3.12/src/pppoe.h --- rp-pppoe-3.12/src/pppoe.h.than 2017-07-25 11:07:38.141305245 +0200 +++ rp-pppoe-3.12/src/pppoe.h 2017-07-25 11:08:34.409195838 +0200 @@ -51,13 +51,6 @@ extern int IsSetID; #include #endif -/* Ugly header files on some Linux boxes... */ -#if defined(HAVE_LINUX_IF_H) -#include -#elif defined(HAVE_NET_IF_H) -#include -#endif - #ifdef HAVE_NET_IF_TYPES_H #include #endif @@ -136,9 +129,6 @@ typedef unsigned long UINT32_t; #ifdef HAVE_NETINET_IF_ETHER_H #include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifndef HAVE_SYS_DLPI_H #include #endif diff -up rp-pppoe-3.12/src/pppoe-server.c.than rp-pppoe-3.12/src/pppoe-server.c --- rp-pppoe-3.12/src/pppoe-server.c.than 2017-07-25 11:08:51.505554918 +0200 +++ rp-pppoe-3.12/src/pppoe-server.c 2017-07-25 11:09:59.230016098 +0200 @@ -26,6 +26,13 @@ static char const RCSID[] = #define _BSD_SOURCE 1 /* for gethostname */ +#include +#if defined(HAVE_LINUX_IF_H) +#include +#elif defined(HAVE_NET_IF_H) +#include +#endif + #include "pppoe-server.h" #include "md5.h" diff -up rp-pppoe-3.12/src/relay.c.than rp-pppoe-3.12/src/relay.c --- rp-pppoe-3.12/src/relay.c.than 2017-07-25 11:10:13.863467871 +0200 +++ rp-pppoe-3.12/src/relay.c 2017-07-25 11:11:17.747074537 +0200 @@ -18,11 +18,19 @@ static char const RCSID[] = "$Id$"; #define _GNU_SOURCE 1 /* For SA_RESTART */ - -#include "relay.h" +#include "config.h" #include +#include +#if defined(HAVE_LINUX_IF_H) +#include +#elif defined(HAVE_NET_IF_H) +#include +#endif + +#include "relay.h" + #ifdef HAVE_SYSLOG_H #include #endif