diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c
index 8c652bd086e1b8a0e1df21c4b6023a996f9a3d9b..64dc1b5506ae242be4496db95f6e491439a844e5 100644
--- a/servers/slapd/back-bdb/index.c
+++ b/servers/slapd/back-bdb/index.c
@@ -25,8 +25,8 @@
 #include "back-bdb.h"
 #include "lutil_hash.h"
 
-static char presence_keyval[LUTIL_HASH_BYTES] = {0,0,0,1};
-static struct berval presence_key = {LUTIL_HASH_BYTES, presence_keyval};
+static char presence_keyval[] = {0,0};
+static struct berval presence_key = BER_BVC(presence_keyval);
 
 AttrInfo *bdb_index_mask(
 	Backend *be,