From bdc93910211b17587be3746b66f21a95ba0d7eb5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 19 Jun 2008 09:50:34 +0200 Subject: Fix the build on FreeBSD 4.6.2 (This used to be commit 4f50cb63e9b565ae0747127baa651a1a1874298b) --- source3/lib/dbwrap_rbt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3') 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; -- cgit