Skip to content

Commit fd5410c

Browse files
committed
Fix build with devkitPPC release 47
1 parent 87d995e commit fd5410c

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

lwip/netif/enc28j60if.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
enc28j60if.c -- ENC28J60 device driver
44
5-
Copyright (C) 2023 Extrems' Corner.org
5+
Copyright (C) 2023 - 2025 Extrems' Corner.org
66
77
This software is provided 'as-is', without any express or implied
88
warranty. In no event will the authors be held liable for any
@@ -459,19 +459,19 @@ static void ENC28J60_GetMACAddr(s32 chan, u8 macaddr[6])
459459
union {
460460
u32 cid[4];
461461
u8 data[18 + 1];
462-
} ecid = {{
463-
mfspr(ECID0),
464-
mfspr(ECID1),
465-
mfspr(ECID2),
466-
mfspr(ECID3)
467-
}};
462+
} ecid = {};
468463

469-
u32 sum = chan;
464+
ecid.cid[0] = mfspr(ECID0);
465+
ecid.cid[1] = mfspr(ECID1);
466+
ecid.cid[2] = mfspr(ECID2);
467+
ecid.cid[3] = mfspr(ECID3);
470468

471469
ecid.data[15] ^= 0x00;
472470
ecid.data[16] ^= 0x04;
473471
ecid.data[17] ^= 0xA3;
474472

473+
u32 sum = chan;
474+
475475
for (int i = 0; i < 18; i += 3) {
476476
sum += *(u32 *)&ecid.data[i] >> 8;
477477
sum = (sum & 0xFFFFFF) + (sum >> 24);

lwip/netif/w5500if.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
w5500if.c -- W5500 device driver
44
5-
Copyright (C) 2024 Extrems' Corner.org
5+
Copyright (C) 2024 - 2025 Extrems' Corner.org
66
77
This software is provided 'as-is', without any express or implied
88
warranty. In no event will the authors be held liable for any
@@ -439,19 +439,19 @@ static void W5500_GetMACAddr(s32 chan, u8 macaddr[6])
439439
union {
440440
u32 cid[4];
441441
u8 data[18 + 1];
442-
} ecid = {{
443-
mfspr(ECID0),
444-
mfspr(ECID1),
445-
mfspr(ECID2),
446-
mfspr(ECID3)
447-
}};
442+
} ecid = {};
448443

449-
u32 sum = chan;
444+
ecid.cid[0] = mfspr(ECID0);
445+
ecid.cid[1] = mfspr(ECID1);
446+
ecid.cid[2] = mfspr(ECID2);
447+
ecid.cid[3] = mfspr(ECID3);
450448

451449
ecid.data[15] ^= 0x00;
452450
ecid.data[16] ^= 0x08;
453451
ecid.data[17] ^= 0xDC;
454452

453+
u32 sum = chan;
454+
455455
for (int i = 0; i < 18; i += 3) {
456456
sum += *(u32 *)&ecid.data[i] >> 8;
457457
sum = (sum & 0xFFFFFF) + (sum >> 24);

lwip/netif/w6100if.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
w6100if.c -- W6100 device driver
44
5-
Copyright (C) 2024 Extrems' Corner.org
5+
Copyright (C) 2024 - 2025 Extrems' Corner.org
66
77
This software is provided 'as-is', without any express or implied
88
warranty. In no event will the authors be held liable for any
@@ -795,19 +795,19 @@ static void W6100_GetMACAddr(s32 chan, u8 macaddr[6])
795795
union {
796796
u32 cid[4];
797797
u8 data[18 + 1];
798-
} ecid = {{
799-
mfspr(ECID0),
800-
mfspr(ECID1),
801-
mfspr(ECID2),
802-
mfspr(ECID3)
803-
}};
798+
} ecid = {};
804799

805-
u32 sum = chan;
800+
ecid.cid[0] = mfspr(ECID0);
801+
ecid.cid[1] = mfspr(ECID1);
802+
ecid.cid[2] = mfspr(ECID2);
803+
ecid.cid[3] = mfspr(ECID3);
806804

807805
ecid.data[15] ^= 0x00;
808806
ecid.data[16] ^= 0x08;
809807
ecid.data[17] ^= 0xDC;
810808

809+
u32 sum = chan;
810+
811811
for (int i = 0; i < 18; i += 3) {
812812
sum += *(u32 *)&ecid.data[i] >> 8;
813813
sum = (sum & 0xFFFFFF) + (sum >> 24);

0 commit comments

Comments
 (0)