lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 0315e2a0b1149888c471b8d690734297dbd1d976
parent 58f4a62701fbf506e57f0892d05a9c35aa9cfc8b
Author: Duncaen <mail@duncano.de>
Date:   Tue,  7 Mar 2017 04:14:03 +0100

lib/libopenbsd: fix ALIGN macro

Diffstat:
lib/libopenbsd/openbsd.h | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/libopenbsd/openbsd.h b/lib/libopenbsd/openbsd.h @@ -10,9 +10,11 @@ #define FAIL_INSTEAD_OF_TRYING_FALLBACK +#ifndef ALIGN /* XXX: x86_64 only, see sys/arch/$arch/include/_types.h */ -#define ALIGNBYTES (sizeof(long) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNBYTES (sizeof(long) - 1) +#define ALIGN(p) (((size_t)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#endif #define __UNUSED __attribute__ ((unused))