aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-07 04:14:03 +0100
committerDuncaen <mail@duncano.de>2017-03-07 04:14:03 +0100
commit0315e2a0b1149888c471b8d690734297dbd1d976 (patch)
tree60f77b78305cd4b34cf82d2eb48845fd7162bf4c
parent58f4a62701fbf506e57f0892d05a9c35aa9cfc8b (diff)
downloadlobase-0315e2a0b1149888c471b8d690734297dbd1d976.tar.gz
lib/libopenbsd: fix ALIGN macro
-rw-r--r--lib/libopenbsd/openbsd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libopenbsd/openbsd.h b/lib/libopenbsd/openbsd.h
index f0aa3d9..f1488d2 100644
--- 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))