All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ethtool: fix musl-libc builds
@ 2023-01-29  2:17 Vincent Fazio
  2023-01-29 16:30 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fazio @ 2023-01-29  2:17 UTC (permalink / raw)
  To: buildroot; +Cc: Florian Fainelli, Matt Weber, Thomas Petazzoni, Vincent Fazio

Upstream commit 1fa60003a8b8 made a change to headers that broke
compiles for musl-libc based builds.

Apply the patch slated to address the issue.

Fixes:
  - http://autobuild.buildroot.net/results/eafd07dddfe7e8b714fc3fcaf77a2d7150694ee2/

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
 ...2-marvell.c-Fix-build-with-musl-libc.patch | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch

diff --git a/package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch b/package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch
new file mode 100644
index 0000000000..f13edbbe50
--- /dev/null
+++ b/package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch
@@ -0,0 +1,71 @@
+From a26296eea68aa6c16b253f34825c9b9007269672 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Sat, 14 Jan 2023 08:34:11 -0800
+Subject: [PATCH] marvell.c: Fix build with musl-libc
+
+After commit 1fa60003a8b8 ("misc: header includes cleanup") we stopped
+including net/if.h which resolved the proper defines to pull in
+sys/types.h and provide a definition for u_int32_t. With musl-libc we
+would need to define _GNU_SOURCE to ensure that sys/types.h does provide a
+definition for u_int32_t.
+
+Rather, just replace u_uint{16,32}_t with the more standard
+uint{16,32}_t types from stdint.h
+
+Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+
+[Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20230114163411.3290201-4-f.fainelli@gmail.com/]
+Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
+---
+ marvell.c | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/marvell.c b/marvell.c
+index d3d570e..3f3aed8 100644
+--- a/marvell.c
++++ b/marvell.c
+@@ -31,23 +31,23 @@ static void dump_timer(const char *name, const void *p)
+ static void dump_queue(const char *name, const void *a, int rx)
+ {
+ 	struct desc {
+-		u_int32_t		ctl;
+-		u_int32_t		next;
+-		u_int32_t		data_lo;
+-		u_int32_t		data_hi;
+-		u_int32_t		status;
+-		u_int32_t		timestamp;
+-		u_int16_t		csum2;
+-		u_int16_t		csum1;
+-		u_int16_t		csum2_start;
+-		u_int16_t		csum1_start;
+-		u_int32_t		addr_lo;
+-		u_int32_t		addr_hi;
+-		u_int32_t		count_lo;
+-		u_int32_t		count_hi;
+-		u_int32_t               byte_count;
+-		u_int32_t               csr;
+-		u_int32_t               flag;
++		uint32_t		ctl;
++		uint32_t		next;
++		uint32_t		data_lo;
++		uint32_t		data_hi;
++		uint32_t		status;
++		uint32_t		timestamp;
++		uint16_t		csum2;
++		uint16_t		csum1;
++		uint16_t		csum2_start;
++		uint16_t		csum1_start;
++		uint32_t		addr_lo;
++		uint32_t		addr_hi;
++		uint32_t		count_lo;
++		uint32_t		count_hi;
++		uint32_t		byte_count;
++		uint32_t		csr;
++		uint32_t		flag;
+ 	};
+ 	const struct desc *d = a;
+ 
+-- 
+2.25.1
+
-- 
2.25.1

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

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

* Re: [Buildroot] [PATCH 1/1] package/ethtool: fix musl-libc builds
  2023-01-29  2:17 [Buildroot] [PATCH 1/1] package/ethtool: fix musl-libc builds Vincent Fazio
@ 2023-01-29 16:30 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-01-29 16:30 UTC (permalink / raw)
  To: Vincent Fazio; +Cc: Florian Fainelli, Matt Weber, Thomas Petazzoni, buildroot

Vincent, All,

On 2023-01-28 20:17 -0600, Vincent Fazio spake thusly:
> Upstream commit 1fa60003a8b8 made a change to headers that broke
> compiles for musl-libc based builds.
> 
> Apply the patch slated to address the issue.
> 
> Fixes:
>   - http://autobuild.buildroot.net/results/eafd07dddfe7e8b714fc3fcaf77a2d7150694ee2/
> 
> Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...2-marvell.c-Fix-build-with-musl-libc.patch | 71 +++++++++++++++++++
>  1 file changed, 71 insertions(+)
>  create mode 100644 package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch
> 
> diff --git a/package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch b/package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch
> new file mode 100644
> index 0000000000..f13edbbe50
> --- /dev/null
> +++ b/package/ethtool/0002-marvell.c-Fix-build-with-musl-libc.patch
> @@ -0,0 +1,71 @@
> +From a26296eea68aa6c16b253f34825c9b9007269672 Mon Sep 17 00:00:00 2001
> +From: Florian Fainelli <f.fainelli@gmail.com>
> +Date: Sat, 14 Jan 2023 08:34:11 -0800
> +Subject: [PATCH] marvell.c: Fix build with musl-libc
> +
> +After commit 1fa60003a8b8 ("misc: header includes cleanup") we stopped
> +including net/if.h which resolved the proper defines to pull in
> +sys/types.h and provide a definition for u_int32_t. With musl-libc we
> +would need to define _GNU_SOURCE to ensure that sys/types.h does provide a
> +definition for u_int32_t.
> +
> +Rather, just replace u_uint{16,32}_t with the more standard
> +uint{16,32}_t types from stdint.h
> +
> +Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
> +Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> +
> +[Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20230114163411.3290201-4-f.fainelli@gmail.com/]
> +Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
> +---
> + marvell.c | 34 +++++++++++++++++-----------------
> + 1 file changed, 17 insertions(+), 17 deletions(-)
> +
> +diff --git a/marvell.c b/marvell.c
> +index d3d570e..3f3aed8 100644
> +--- a/marvell.c
> ++++ b/marvell.c
> +@@ -31,23 +31,23 @@ static void dump_timer(const char *name, const void *p)
> + static void dump_queue(const char *name, const void *a, int rx)
> + {
> + 	struct desc {
> +-		u_int32_t		ctl;
> +-		u_int32_t		next;
> +-		u_int32_t		data_lo;
> +-		u_int32_t		data_hi;
> +-		u_int32_t		status;
> +-		u_int32_t		timestamp;
> +-		u_int16_t		csum2;
> +-		u_int16_t		csum1;
> +-		u_int16_t		csum2_start;
> +-		u_int16_t		csum1_start;
> +-		u_int32_t		addr_lo;
> +-		u_int32_t		addr_hi;
> +-		u_int32_t		count_lo;
> +-		u_int32_t		count_hi;
> +-		u_int32_t               byte_count;
> +-		u_int32_t               csr;
> +-		u_int32_t               flag;
> ++		uint32_t		ctl;
> ++		uint32_t		next;
> ++		uint32_t		data_lo;
> ++		uint32_t		data_hi;
> ++		uint32_t		status;
> ++		uint32_t		timestamp;
> ++		uint16_t		csum2;
> ++		uint16_t		csum1;
> ++		uint16_t		csum2_start;
> ++		uint16_t		csum1_start;
> ++		uint32_t		addr_lo;
> ++		uint32_t		addr_hi;
> ++		uint32_t		count_lo;
> ++		uint32_t		count_hi;
> ++		uint32_t		byte_count;
> ++		uint32_t		csr;
> ++		uint32_t		flag;
> + 	};
> + 	const struct desc *d = a;
> + 
> +-- 
> +2.25.1
> +
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-01-29 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-29  2:17 [Buildroot] [PATCH 1/1] package/ethtool: fix musl-libc builds Vincent Fazio
2023-01-29 16:30 ` Yann E. MORIN

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.