[PATCH 16/16] pppoe: include netinet/in.h before linux/in.h

This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
included before <linux/in.h> otherwise the earlier, unaware of the latter,
tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
alone anymore, since it pulls the headers in the wrong order, so we better
include <netinet/in.h> early.

Gbp-Pq: Name 0016-pppoe-include-netinet-in.h-before-linux-in.h.patch
This commit is contained in:
Lubomir Rintel 2017-01-09 13:34:23 +00:00 committed by openKylinBot
parent 3a24c1ced7
commit e5ce2cc9b1
1 changed files with 4 additions and 3 deletions

View File

@ -47,6 +47,10 @@
#include <sys/socket.h>
#endif
/* This has to be included before Linux 4.8's linux/in.h
* gets dragged in. */
#include <netinet/in.h>
/* Ugly header files on some Linux boxes... */
#if defined(HAVE_LINUX_IF_H)
#include <linux/if.h>
@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
#include <linux/if_ether.h>
#endif
#include <netinet/in.h>
#ifdef HAVE_NETINET_IF_ETHER_H
#include <sys/types.h>
@ -98,7 +100,6 @@ typedef unsigned long UINT32_t;
#endif
/* Ethernet frame types according to RFC 2516 */
#define ETH_PPPOE_DISCOVERY 0x8863
#define ETH_PPPOE_SESSION 0x8864