]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/trans.c
Move MSVC port to the Attic
[openldap] / servers / slapd / back-bdb / trans.c
index 51fecf418b78f8c9ff79352036a803a0242b7e03..d13196b26e1e055a14f36159ecf0444ce10ed1c5 100644 (file)
@@ -1,5 +1,18 @@
 /* trans.c - bdb backend transaction routines */
 /* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 2000-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
 
 #include "portable.h"
 
@@ -9,6 +22,7 @@
 #include "back-bdb.h"
 #include "external.h"
 #include "lber_pvt.h"
+#include "lutil.h"
 
 
 /* Congestion avoidance code
@@ -25,7 +39,7 @@ bdb_trans_backoff( int num_retries )
        unsigned long max_key = -1;
        struct timeval timeout;
 
-       lutil_entropy( &key, sizeof( unsigned long ));
+       lutil_entropy( (unsigned char *) &key, sizeof( unsigned long ));
 
        for ( i = 0; i < num_retries; i++ ) {
                if ( i >= 5 ) break;