* [Buildroot] [PATCH] pppd: Move netinet/in.h above linux header includes
@ 2016-10-20 21:12 stefan.nickl at gmail.com
2016-10-20 21:23 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: stefan.nickl at gmail.com @ 2016-10-20 21:12 UTC (permalink / raw)
To: buildroot
From: Stefan Nickl <Stefan.Nickl@gmail.com>
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 <Stefan.Nickl@gmail.com>
---
This looks better now regarding the uclibc breakage.
diff --git a/package/pppd/0001-Move-netinet-in.h-above-linux-header-includes.patch b/package/pppd/0001-Move-netinet-in.h-above-linux-header-includes.patch
new file mode 100644
index 0000000..2f6933f
--- /dev/null
+++ b/package/pppd/0001-Move-netinet-in.h-above-linux-header-includes.patch
@@ -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>
+
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] pppd: Move netinet/in.h above linux header includes
2016-10-20 21:12 [Buildroot] [PATCH] pppd: Move netinet/in.h above linux header includes stefan.nickl at gmail.com
@ 2016-10-20 21:23 ` Thomas Petazzoni
[not found] ` <CAFOMc=TTG9Z4iO0m5K+-Sao=fsk45MayfqmfvqM2O60SrWXMXQ@mail.gmail.com>
2016-10-20 21:40 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-10-20 21:23 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 20 Oct 2016 23:12:37 +0200, stefan.nickl at gmail.com wrote:
> From: Stefan Nickl <Stefan.Nickl@gmail.com>
>
> 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 <Stefan.Nickl@gmail.com>
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] pppd: Move netinet/in.h above linux header includes
[not found] ` <CAFOMc=TTG9Z4iO0m5K+-Sao=fsk45MayfqmfvqM2O60SrWXMXQ@mail.gmail.com>
@ 2016-10-20 21:36 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-10-20 21:36 UTC (permalink / raw)
To: buildroot
Hello,
Please keep the Buildroot list in Cc.
On Thu, 20 Oct 2016 23:31:57 +0200, Stefan Nickl wrote:
> > 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.
> 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] pppd: Move netinet/in.h above linux header includes
2016-10-20 21:23 ` Thomas Petazzoni
[not found] ` <CAFOMc=TTG9Z4iO0m5K+-Sao=fsk45MayfqmfvqM2O60SrWXMXQ@mail.gmail.com>
@ 2016-10-20 21:40 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-10-20 21:40 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 20 Oct 2016 23:23:39 +0200, Thomas Petazzoni wrote:
> 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-20 21:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-20 21:12 [Buildroot] [PATCH] pppd: Move netinet/in.h above linux header includes stefan.nickl at gmail.com
2016-10-20 21:23 ` Thomas Petazzoni
[not found] ` <CAFOMc=TTG9Z4iO0m5K+-Sao=fsk45MayfqmfvqM2O60SrWXMXQ@mail.gmail.com>
2016-10-20 21:36 ` Thomas Petazzoni
2016-10-20 21:40 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox