net-dialup/rp-pppoe: fix build w/linux-headers-4.8+
authorMike Frysinger <vapier@gentoo.org>
Fri, 11 Nov 2016 19:27:33 +0000 (14:27 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 11 Nov 2016 20:12:31 +0000 (15:12 -0500)
net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch [new file with mode: 0644]
net-dialup/rp-pppoe/rp-pppoe-3.12.ebuild

diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch
new file mode 100644 (file)
index 0000000..961eba3
--- /dev/null
@@ -0,0 +1,28 @@
+the linux headers have started adding shims to not define types or structs
+when C lib headers are active, but in order to work, the C lib headers have
+to be included before the linux headers.
+
+move the netinet/in.h include up above the linux/ includes.
+
+Mike Frysinger <vapier@gentoo.org>
+
+--- a/src/pppoe.h
++++ b/src/pppoe.h
+@@ -47,6 +47,8 @@
+ #include <sys/socket.h>
+ #endif
+ 
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +86,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>
+ 
index addecd9c29ff7c95fd7b47a2dd50c5d33ac88529..4739e1f59e3e9c393e6358b353de43739cfd3c02 100644 (file)
@@ -48,6 +48,7 @@ src_prepare() {
        epatch "${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch"
        epatch "${FILESDIR}/${PN}-3.11-gentoo.patch"
        epatch "${FILESDIR}/${PN}-3.11-kmode.patch" #364941
+       epatch "${FILESDIR}/${PN}-3.12-linux-headers.patch"
 
        epatch_user