From f4973d31bb0673bc6a5fc207713837f143920b01 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 12 Jul 2022 10:59:16 +0100 Subject: Use uintptr_t in fts for pointer alignment The code assumed unsigned long can represent pointers. Reviewed-by: Adhemerval Zanella --- io/fts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'io') diff --git a/io/fts.c b/io/fts.c index 283cf17..5a0a47a 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 -- cgit v1.1