All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rp-pppoe: fix musl build
@ 2016-01-23 23:50 Bernd Kuhls
  0 siblings, 0 replies; 3+ messages in thread
From: Bernd Kuhls @ 2016-01-23 23:50 UTC (permalink / raw)
  To: buildroot

The autobuilders did not catch the error yet because they failed
earlier with other packages, but I am continuing the build based
on the defconfig from:
http://autobuild.buildroot.net/results/6cc/6cc0f8c067e07deea688b9b97284601a596b898c/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/rp-pppoe/0001-musl-fix.patch | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 package/rp-pppoe/0001-musl-fix.patch

diff --git a/package/rp-pppoe/0001-musl-fix.patch b/package/rp-pppoe/0001-musl-fix.patch
new file mode 100644
index 0000000..645e27a
--- /dev/null
+++ b/package/rp-pppoe/0001-musl-fix.patch
@@ -0,0 +1,20 @@
+Fix musl build
+
+Downloaded from
+http://git.alpinelinux.org/cgit/aports/plain/main/rp-pppoe/musl-fix.patch
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+--- ./src/pppoe.h.orig
++++ ./src/pppoe.h
+@@ -127,10 +127,6 @@
+ #error Could not find a 32-bit integer type
+ #endif
+ 
+-#ifdef HAVE_LINUX_IF_ETHER_H
+-#include <linux/if_ether.h>
+-#endif
+-
+ #include <netinet/in.h>
+ 
+ #ifdef HAVE_NETINET_IF_ETHER_H
-- 
2.7.0.rc3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rp-pppoe: fix musl build
  2021-12-11 21:12 Fabrice Fontaine
@ 2021-12-12 14:52 ` Arnout Vandecappelle
  0 siblings, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-12-12 14:52 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot



On 11/12/2021 22:12, Fabrice Fontaine wrote:
> Fix the following musl build failure raised since bump of pppd to
> version 2.4.9 in commit 075b01f2f7b5a9241b4bfe76db8f14af0284060c:
> 
> In file included from pppoe.h:133,
>                   from debug.c:19:
> /home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:116:8: error: redefinition of 'struct ethhdr'
>    116 | struct ethhdr {
>        |        ^~~~~~
> In file included from pppoe.h:121,
>                   from debug.c:19:
> /home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h:163:8: note: originally defined here
>    163 | struct ethhdr {
>        |        ^~~~~~
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/ccca18fcbcde65cb6784f5559eac68ca17ab14a3
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ...src-pppoe.h-fix-build-with-musl-libc.patch | 60 +++++++++++++++++++
>   1 file changed, 60 insertions(+)
>   create mode 100644 package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch
> 
> diff --git a/package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch b/package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch
> new file mode 100644
> index 0000000000..29ba72be4f
> --- /dev/null
> +++ b/package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch
> @@ -0,0 +1,60 @@
> +From bbf5b2759cff0c65b47fd6dbe5fe7341f205ad03 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sat, 11 Dec 2021 22:03:16 +0100
> +Subject: [PATCH] src/pppoe.h: fix build with musl libc
> +
> +musl libc defines its own struct ethhdr that conflicts with the kernel
> +define one. The kernel headers provide a way to suppress its struct
> +ethhdr. For that to work the libc headers must precede the kernel. Move
> +the kernel linux/if_ether.h include below libc netinet/if_ether.h. That
> +fixes the following build failure:
> +
> +In file included from pppoe.h:133,
> +                 from debug.c:19:
> +/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:116:8: error: redefinition of 'struct ethhdr'
> +  116 | struct ethhdr {
> +      |        ^~~~~~
> +In file included from pppoe.h:121,
> +                 from debug.c:19:
> +/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h:163:8: note: originally defined here
> +  163 | struct ethhdr {
> +      |        ^~~~~~
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/ccca18fcbcde65cb6784f5559eac68ca17ab14a3
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/dfskoll/rp-pppoe/pull/4]
> +---
> + src/pppoe.h | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/src/pppoe.h b/src/pppoe.h
> +index 4780092..2b08111 100644
> +--- a/src/pppoe.h
> ++++ b/src/pppoe.h
> +@@ -117,10 +117,6 @@ typedef unsigned long UINT32_t;
> + #error Could not find a 32-bit integer type
> + #endif
> +
> +-#ifdef HAVE_LINUX_IF_ETHER_H
> +-#include <linux/if_ether.h>
> +-#endif
> +-
> + #include <netinet/in.h>
> +
> + #ifdef HAVE_NETINET_IF_ETHER_H
> +@@ -134,6 +130,10 @@ typedef unsigned long UINT32_t;
> + #endif
> + #endif
> +
> ++#ifdef HAVE_LINUX_IF_ETHER_H
> ++#include <linux/if_ether.h>
> ++#endif
> ++
> +
> +
> + /* Ethernet frame types according to RFC 2516 */
> +--
> +2.33.0
> +
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/rp-pppoe: fix musl build
@ 2021-12-11 21:12 Fabrice Fontaine
  2021-12-12 14:52 ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2021-12-11 21:12 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following musl build failure raised since bump of pppd to
version 2.4.9 in commit 075b01f2f7b5a9241b4bfe76db8f14af0284060c:

In file included from pppoe.h:133,
                 from debug.c:19:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:116:8: error: redefinition of 'struct ethhdr'
  116 | struct ethhdr {
      |        ^~~~~~
In file included from pppoe.h:121,
                 from debug.c:19:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h:163:8: note: originally defined here
  163 | struct ethhdr {
      |        ^~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/ccca18fcbcde65cb6784f5559eac68ca17ab14a3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...src-pppoe.h-fix-build-with-musl-libc.patch | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch

diff --git a/package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch b/package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch
new file mode 100644
index 0000000000..29ba72be4f
--- /dev/null
+++ b/package/rp-pppoe/0002-src-pppoe.h-fix-build-with-musl-libc.patch
@@ -0,0 +1,60 @@
+From bbf5b2759cff0c65b47fd6dbe5fe7341f205ad03 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 11 Dec 2021 22:03:16 +0100
+Subject: [PATCH] src/pppoe.h: fix build with musl libc
+
+musl libc defines its own struct ethhdr that conflicts with the kernel
+define one. The kernel headers provide a way to suppress its struct
+ethhdr. For that to work the libc headers must precede the kernel. Move
+the kernel linux/if_ether.h include below libc netinet/if_ether.h. That
+fixes the following build failure:
+
+In file included from pppoe.h:133,
+                 from debug.c:19:
+/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:116:8: error: redefinition of 'struct ethhdr'
+  116 | struct ethhdr {
+      |        ^~~~~~
+In file included from pppoe.h:121,
+                 from debug.c:19:
+/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h:163:8: note: originally defined here
+  163 | struct ethhdr {
+      |        ^~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/ccca18fcbcde65cb6784f5559eac68ca17ab14a3
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/dfskoll/rp-pppoe/pull/4]
+---
+ src/pppoe.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/pppoe.h b/src/pppoe.h
+index 4780092..2b08111 100644
+--- a/src/pppoe.h
++++ b/src/pppoe.h
+@@ -117,10 +117,6 @@ typedef unsigned long UINT32_t;
+ #error Could not find a 32-bit integer type
+ #endif
+ 
+-#ifdef HAVE_LINUX_IF_ETHER_H
+-#include <linux/if_ether.h>
+-#endif
+-
+ #include <netinet/in.h>
+ 
+ #ifdef HAVE_NETINET_IF_ETHER_H
+@@ -134,6 +130,10 @@ typedef unsigned long UINT32_t;
+ #endif
+ #endif
+ 
++#ifdef HAVE_LINUX_IF_ETHER_H
++#include <linux/if_ether.h>
++#endif
++
+ 
+ 
+ /* Ethernet frame types according to RFC 2516 */
+-- 
+2.33.0
+
-- 
2.33.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-12 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 23:50 [Buildroot] [PATCH 1/1] package/rp-pppoe: fix musl build Bernd Kuhls
2021-12-11 21:12 Fabrice Fontaine
2021-12-12 14:52 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.