git: eb92fbcadeec - stable/15 - telnet: Remove usage of ALIGN
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Dec 2025 17:07:15 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=eb92fbcadeecb677d90e3cac572b64b862545015
commit eb92fbcadeecb677d90e3cac572b64b862545015
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-12-22 15:18:52 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-12-29 14:31:40 +0000
telnet: Remove usage of ALIGN
gcc doesn't like ALIGN() being applied to an array type. Just use
__aligned instead.
Reported by: Jenkins
Reviewed by: brooks
Fixes: 80203a27e964 ("Add sys/_align.h replacing machine/_align.h")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54290
(cherry picked from commit 3a4275a5f1f5dccd6918c4eff3b84488e322ad5d)
---
contrib/telnet/telnet/commands.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c
index ca3460e455ad..2005362b5326 100644
--- a/contrib/telnet/telnet/commands.c
+++ b/contrib/telnet/telnet/commands.c
@@ -2848,7 +2848,7 @@ cmdrc(char *m1, char *m2)
static int
sourceroute(struct addrinfo *ai, char *arg, unsigned char **cpp, int *lenp, int *protop, int *optp)
{
- static char buf[1024 + ALIGNBYTES]; /*XXX*/
+ static char buf[1024] __aligned(sizeof(void *)); /*XXX*/
unsigned char *cp, *cp2, *lsrp, *ep;
struct sockaddr_in *_sin;
#ifdef INET6
@@ -2888,7 +2888,7 @@ sourceroute(struct addrinfo *ai, char *arg, unsigned char **cpp, int *lenp, int
lsrp = *cpp;
ep = lsrp + *lenp;
} else {
- *cpp = lsrp = (char *)ALIGN(buf);
+ *cpp = lsrp = buf;
ep = lsrp + 1024;
}