]> git.ozlabs.org Git - ppp.git/commitdiff
rp-pppoe: Fix compilation with musl libc
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 30 Dec 2020 01:04:57 +0000 (12:04 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 30 Dec 2020 01:06:39 +0000 (12:06 +1100)
Ensure that we don't include both <netinet/if_ether.h> and
<linux/if_ether.h>, and don't include <net/ethernet.h>.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pppd/plugins/rp-pppoe/if.c
pppd/plugins/rp-pppoe/plugin.c
pppd/plugins/rp-pppoe/pppoe-discovery.c
pppd/plugins/rp-pppoe/pppoe.h

index 07b20b1717ab5e9637a0394e5f83154733a272d7..225dd567c2e7486c5ef3998c108ac5e8bb18afce 100644 (file)
@@ -30,10 +30,6 @@ static char const RCSID[] =
 #include <linux/if_packet.h>
 #endif
 
-#ifdef HAVE_NET_ETHERNET_H
-#include <net/ethernet.h>
-#endif
-
 #ifdef HAVE_ASM_TYPES_H
 #include <asm/types.h>
 #endif
index 44e0c31de9f3f6af6abd629ae78954462eccc2f8..93c0906119d7240fd60ba483768c3654ef642f5f 100644 (file)
@@ -46,7 +46,6 @@ static char const RCSID[] =
 #include <unistd.h>
 #include <fcntl.h>
 #include <signal.h>
-#include <net/ethernet.h>
 #include <net/if_arp.h>
 #include <linux/ppp_defs.h>
 #include <linux/if_pppox.h>
index 1a243fe4cb26d1120f9c244ce396bd0f6329ebb9..c97033739e0f0504a03dadc7ac4632973e08321a 100644 (file)
 #include <linux/if_packet.h>
 #endif
 
-#ifdef HAVE_NET_ETHERNET_H
-#include <net/ethernet.h>
-#endif
-
 #ifdef HAVE_ASM_TYPES_H
 #include <asm/types.h>
 #endif
index a4e7d5cceefc5712165bfbe15b1e449fd41844e0..e2dc2ff9c00260d8437274941db0eb3ee20c7d97 100644 (file)
@@ -82,7 +82,7 @@ typedef unsigned long UINT32_t;
 
 #ifdef HAVE_LINUX_IF_ETHER_H
 #include <linux/if_ether.h>
-#endif
+#else
 
 #ifdef HAVE_NETINET_IF_ETHER_H
 #include <sys/types.h>
@@ -94,7 +94,7 @@ typedef unsigned long UINT32_t;
 #include <netinet/if_ether.h>
 #endif
 #endif
-
+#endif
 
 /* Ethernet frame types according to RFC 2516 */
 #define ETH_PPPOE_DISCOVERY 0x8863