summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMartin Hedenfal <martinh@cvs.openbsd.org>2010-06-17 18:36:37 +0000
committerMartin Hedenfal <martinh@cvs.openbsd.org>2010-06-17 18:36:37 +0000
commitb2e3c8e53d83970074fb38fedf7b97d1fad90a5f (patch)
tree45952a72844c4b241b6442921fb024589ef735c0 /usr.sbin
parent1ceb5a4d9b048b86f83cac78b612ced56b0157ee (diff)
Fix byte alignment on sparc64.
From Alexander Schrijver.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldapd/btree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ldapd/btree.c b/usr.sbin/ldapd/btree.c
index b9d68b7a834..05e208f0772 100644
--- a/usr.sbin/ldapd/btree.c
+++ b/usr.sbin/ldapd/btree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: btree.c,v 1.11 2010/06/15 15:54:39 martinh Exp $ */
+/* $OpenBSD: btree.c,v 1.12 2010/06/17 18:36:36 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -82,7 +82,7 @@ struct page { /* represents an on-disk page */
#define PAGEHDRSZ (sizeof(pgno_t) + sizeof(uint32_t) + \
sizeof(union page_bounds))
indx_t ptrs[(PAGESIZE - PAGEHDRSZ) / sizeof(indx_t)];
-};
+} __packed;
#define NUMKEYSP(p) (((p)->lower - PAGEHDRSZ) >> 1)
#define NUMKEYS(mp) (((mp)->page.lower - PAGEHDRSZ) >> 1)
@@ -109,7 +109,7 @@ struct bt_meta { /* meta (footer) page content */
uint32_t depth;
uint64_t entries;
unsigned char hash[SHA_DIGEST_LENGTH];
-};
+} __packed;
struct btkey {
size_t len;
@@ -179,7 +179,7 @@ struct node {
#define F_BIGDATA 0x01 /* data put on overflow page */
uint8_t flags;
char data[1];
-};
+} __packed;
struct btree_txn {
pgno_t root; /* current / new root page */