pppd: Move netinet/in.h above linux header includes
PATCH 1/1 pppd: Move netinet/in.h above linux header includes
From: Stefan Nickl <[email protected]>
Linux uapi headers try to avoid redeclaring things from libc via linux/libc-compat.h. However that only works if the libc header is included first.
---
This looks better now regarding the uclibc breakage.
package/pppd/0001-Move-netinet-in.h-above-linux-header-includes.patch new file +22 -0
@@ -0,0 +1,22 @@ +diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h +index 9ab2eee..b827620 100644 +--- a/pppd/plugins/rp-pppoe/pppoe.h ++++ b/pppd/plugins/rp-pppoe/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> +
Signature · 1 line
2.7.4
PATCH 1/1 pppd: Move netinet/in.h above linux header includes
Hello,
Quoted 7 lines · stefan.nickl at gmail.com
From: Stefan Nickl <[email protected]>
Linux uapi headers try to avoid redeclaring things from libc via
linux/libc-compat.h. However that only works if the libc header is included first.Signed-off-by Stefan Nickl <[email protected]>
Thanks for your contribution! However, exactly 15 minutes before you sent this patch, I committed a change for the same problem:
https://git.buildroot.org/buildroot/commit/?id=035567b2793f3649e2ddc6cd34b75dd643f47d73.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): CAFOMc=TTG9Z4iO0m5K+-Sao=fsk45MayfqmfvqM2O60SrWXMXQ@mail.gmail.com
PATCH 1/1 pppd: Move netinet/in.h above linux header includes
Hello,
Please keep the Buildroot list in Cc.
Quoted 8 lines · Stefan Nickl
Quoted 5 lines
Thanks for your contribution! However, exactly 15 minutes before you sent this patch, I committed a change for the same problem:
https://git.buildroot.org/buildroot/commit/?id=035567b2793f3649e2ddc6cd34b75dd643f47d73.Going all-in on kernel headers is also a way to deal with the issue, but I think one should try to move towards libc headers.
Agreed, using libc headers would be nicer. But pppd is already a big mess in terms of mixing libc and kernel headers, so this little fix was good enough for the job.
Quoted 2 lines
Anyway, no hard feelings here, I'm curious how it will hold up across various build permutations.
Yes, we'll see what it gives.
As you've said in another thread, the pppd project is more-or-less dead upstream, so someone really needs to revive this project and provide a better upstream.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 pppd: Move netinet/in.h above linux header includes
In reply to Thomas PetazzoniHello,
Quoted 3 lines · Thomas Petazzoni
Thanks for your contribution! However, exactly 15 minutes before you sent this patch, I committed a change for the same problem:
https://git.buildroot.org/buildroot/commit/?id=035567b2793f3649e2ddc6cd34b75dd643f47d73.
And in the end, my patch solved the build with recent kernel headers (4.8), but broke the build with older kernel headers (like 3.10). So Stefan, I've taken your patch and applied it in replacement to mine, after testing that it makes the build break with both 4.8 and 3.10 kernel headers.
Thanks for your contribution, and sorry for the initial dismissal of your patch!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com