diff options
author | Volker Lendecke <vl@samba.org> | 2008-06-19 09:50:34 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-06-19 12:02:12 +0200 |
commit | bdc93910211b17587be3746b66f21a95ba0d7eb5 (patch) | |
tree | 730080bb6e96cdb2a74fcffd3f6a62c0c54e30c6 /source3/lib | |
parent | 33aa758bf3918a9a78daf4ee26d731ed849331f0 (diff) | |
download | samba-bdc93910211b17587be3746b66f21a95ba0d7eb5.tar.gz samba-bdc93910211b17587be3746b66f21a95ba0d7eb5.tar.xz samba-bdc93910211b17587be3746b66f21a95ba0d7eb5.zip |
Fix the build on FreeBSD 4.6.2
(This used to be commit 4f50cb63e9b565ae0747127baa651a1a1874298b)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/dbwrap_rbt.c | 9 |
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; |