From 3a45c3d6439061aa23b40f83c5e5fca7e99cb25d Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 31 May 2016 13:31:19 +0000 Subject: [PATCH] Implement _ALIGN() using internal integer types. The existing version depends on register_t and uintptr_t, which are only available when including headers such as . As this macro is used by , for example, it should be written in such a way that it doesn't depend on those types. --- sys/x86/include/_align.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/include/_align.h b/sys/x86/include/_align.h index 0d0981bcf49e..9f7b6b953236 100644 --- a/sys/x86/include/_align.h +++ b/sys/x86/include/_align.h @@ -46,7 +46,7 @@ * for all data types (int, long, ...). The result is unsigned int * and must be cast to any desired pointer type. */ -#define _ALIGNBYTES (sizeof(register_t) - 1) -#define _ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) +#define _ALIGNBYTES (sizeof(__register_t) - 1) +#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) #endif /* !_X86_INCLUDE__ALIGN_H_ */