ethtool: update to 6.1
[openwrt/staging/aparcar.git] / package / network / utils / ethtool / patches / 102-raw-marvell-c-Fix-build-with-musl-libc.patch
1 From: Florian Fainelli <f.fainelli@gmail.com>
2 To: netdev@vger.kernel.org
3 Subject: [PATCH ethtool v2 3/3] marvell.c: Fix build with musl-libc
4 Date: Sat, 14 Jan 2023 08:34:11 -0800
5
6 After commit 1fa60003a8b8 ("misc: header includes cleanup") we stopped
7 including net/if.h which resolved the proper defines to pull in
8 sys/types.h and provide a definition for u_int32_t. With musl-libc we
9 would need to define _GNU_SOURCE to ensure that sys/types.h does provide a
10 definition for u_int32_t.
11
12 Rather, just replace u_uint{16,32}_t with the more standard
13 uint{16,32}_t types from stdint.h
14
15 Fixes: 1fa60003a8b8 ("misc: header includes cleanup")
16 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
17 ---
18 marvell.c | 34 +++++++++++++++++-----------------
19 1 file changed, 17 insertions(+), 17 deletions(-)
20
21 --- a/marvell.c
22 +++ b/marvell.c
23 @@ -31,23 +31,23 @@ static void dump_timer(const char *name,
24 static void dump_queue(const char *name, const void *a, int rx)
25 {
26 struct desc {
27 - u_int32_t ctl;
28 - u_int32_t next;
29 - u_int32_t data_lo;
30 - u_int32_t data_hi;
31 - u_int32_t status;
32 - u_int32_t timestamp;
33 - u_int16_t csum2;
34 - u_int16_t csum1;
35 - u_int16_t csum2_start;
36 - u_int16_t csum1_start;
37 - u_int32_t addr_lo;
38 - u_int32_t addr_hi;
39 - u_int32_t count_lo;
40 - u_int32_t count_hi;
41 - u_int32_t byte_count;
42 - u_int32_t csr;
43 - u_int32_t flag;
44 + uint32_t ctl;
45 + uint32_t next;
46 + uint32_t data_lo;
47 + uint32_t data_hi;
48 + uint32_t status;
49 + uint32_t timestamp;
50 + uint16_t csum2;
51 + uint16_t csum1;
52 + uint16_t csum2_start;
53 + uint16_t csum1_start;
54 + uint32_t addr_lo;
55 + uint32_t addr_hi;
56 + uint32_t count_lo;
57 + uint32_t count_hi;
58 + uint32_t byte_count;
59 + uint32_t csr;
60 + uint32_t flag;
61 };
62 const struct desc *d = a;
63