[define if you have POSIX termios])
 fi
 
-AC_CHECK_HEADERS(      \
+AC_CHECK_HEADERS(              \
        arpa/inet.h             \
-       arpa/nameser.h  \
+       arpa/nameser.h          \
        assert.h                \
-       bits/types.h    \
+       bits/types.h            \
        conio.h                 \
        crypt.h                 \
        direct.h                \
        libutil.h               \
        limits.h                \
        locale.h                \
-       netinet/tcp.h   \
+       netinet/tcp.h           \
        malloc.h                \
        memory.h                \
        psap.h                  \
        sys/errno.h             \
        sys/ioctl.h             \
        sys/param.h             \
-       sys/resource.h  \
-       sys/select.h    \
-       sys/socket.h    \
+       sys/resource.h          \
+       sys/select.h            \
+       sys/socket.h            \
        sys/stat.h              \
-       sys/syslog.h    \
+       sys/syslog.h            \
        sys/time.h              \
        sys/types.h             \
        sys/ucred.h             \
        syslog.h                \
        termios.h               \
        unistd.h                \
+       utime.h                 \
        winsock.h               \
        winsock2.h              \
 )
 
 #include <ac/stdlib.h>
 #include <ac/errno.h>
 #include <sys/stat.h>
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif /* HAVE_UTIME_H */
 #include "back-bdb.h"
 #include <lutil.h>
 #include <ldap_rq.h>
 
 {
        int rc;
        Entry *e = NULL;
+#ifndef BDB_HIER
        struct berval bv;
+#endif
 
        assert( be != NULL );
        assert( slapMode & SLAP_TOOL_MODE );
 
        BackendInfo *bi
 )
 {
-       slap_overinst *on = glue_tool_inst( bi );
        static int glueClosed = 0;
        int rc = 0;