git: 571743bdc6e2 - main - wlanwds: use a local copy of the ifaddr sockaddr, avoid cast
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Feb 2025 02:50:06 UTC
The branch main has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=571743bdc6e20b14589fef3568f40167399336ec
commit 571743bdc6e20b14589fef3568f40167399336ec
Author: Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2025-02-13 18:28:22 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2025-02-28 02:49:49 +0000
wlanwds: use a local copy of the ifaddr sockaddr, avoid cast
Using the cast results in alignment errors from LLVM.
Fix it to go through void *.
Differential Revision: https://reviews.freebsd.org/D48996
---
tools/tools/net80211/wlanwds/wlanwds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tools/net80211/wlanwds/wlanwds.c b/tools/tools/net80211/wlanwds/wlanwds.c
index 193a9b0a60d4..e64b05658740 100644
--- a/tools/tools/net80211/wlanwds/wlanwds.c
+++ b/tools/tools/net80211/wlanwds/wlanwds.c
@@ -295,7 +295,7 @@ getlladdr(const char *ifname, uint8_t macaddr[ETHER_ADDR_LEN])
}
/* Check address family */
- sdl = (struct sockaddr_dl *) ifa->ifa_addr;
+ sdl = (struct sockaddr_dl *)(void *)ifa->ifa_addr;
if (sdl->sdl_type != IFT_ETHER) {
syslog(LOG_CRIT, "%s: %s: unknown aftype (%d)\n",
__func__,