summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-19 09:50:34 +0200
committerVolker Lendecke <vl@samba.org>2008-06-19 12:02:12 +0200
commitbdc93910211b17587be3746b66f21a95ba0d7eb5 (patch)
tree730080bb6e96cdb2a74fcffd3f6a62c0c54e30c6
parent33aa758bf3918a9a78daf4ee26d731ed849331f0 (diff)
downloadsamba-bdc93910211b17587be3746b66f21a95ba0d7eb5.tar.gz
samba-bdc93910211b17587be3746b66f21a95ba0d7eb5.tar.bz2
samba-bdc93910211b17587be3746b66f21a95ba0d7eb5.zip
Fix the build on FreeBSD 4.6.2
(This used to be commit 4f50cb63e9b565ae0747127baa651a1a1874298b)
-rw-r--r--source3/lib/dbwrap_rbt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/lib/dbwrap_rbt.c b/source3/lib/dbwrap_rbt.c
index 46459c86da..b70ce3dfa0 100644
--- a/source3/lib/dbwrap_rbt.c
+++ b/source3/lib/dbwrap_rbt.c
@@ -20,7 +20,7 @@
#include "includes.h"
#include "rbtree.h"
-#define ALIGN(_size_) (((_size_)+15)&~15)
+#define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
struct db_rbt_ctx {
struct rb_root tree;
@@ -42,7 +42,7 @@ struct db_rbt_node {
* target for offsetof()
*/
- char data[];
+ char data[1];
};
/*
@@ -243,7 +243,8 @@ static struct db_record *db_rbt_fetch_locked(struct db_context *db_ctx,
* off.
*/
- size = ALIGN(sizeof(struct db_record)) + sizeof(struct db_rbt_rec);
+ size = DBWRAP_RBT_ALIGN(sizeof(struct db_record))
+ + sizeof(struct db_rbt_rec);
if (!found) {
/*
@@ -258,7 +259,7 @@ static struct db_record *db_rbt_fetch_locked(struct db_context *db_ctx,
}
rec_priv = (struct db_rbt_rec *)
- ((char *)result + ALIGN(sizeof(struct db_record)));
+ ((char *)result + DBWRAP_RBT_ALIGN(sizeof(struct db_record)));
rec_priv->db_ctx = ctx;
result->store = db_rbt_store;