From: Szabolcs Nagy Date: Tue, 12 Jul 2022 09:59:16 +0000 (+0100) Subject: cheri: Fix pointer alignment in fts X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30719666f854d4c0c6b8b2430dd1dff78851d59f;p=thirdparty%2Fglibc.git cheri: Fix pointer alignment in fts ALIGN has to work on pointers and the code assumed unsigned long can always represent pointers. --- diff --git a/io/fts.c b/io/fts.c index 283cf1791a2..5a0a47a3606 100644 --- a/io/fts.c +++ b/io/fts.c @@ -55,6 +55,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #endif /* Align P to that size. */ #ifndef ALIGN -#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) +#define ALIGN(p) (((uintptr_t) (p) + ALIGNBYTES) & ~ALIGNBYTES) #endif