[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: entropy.c (ITS#337)



- To make it compile and work on Solaris 2.5.1 you 
need the following patch. 

Index: entropy.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/liblutil/entropy.c,v
retrieving revision 1.9
diff -u -r1.9 entropy.c
--- entropy.c	1999/10/27 17:42:27	1.9
+++ entropy.c	1999/10/27 19:45:44
@@ -79,7 +79,7 @@
 		 *	MD5 is a strong cryptographic hash, this should
 		 *	be fairly resistant to attack
 		 */
-		static sig_atomic_t counter = 0;
+		static int counter = 0;
 		int n;
 
 		struct rdata_s {
@@ -91,7 +91,7 @@
 			pid_t	pid;
 
 #ifdef HAVE_GETTIMEOFDAY
-			struct timeval *tv;
+			struct timeval tv;
 #else
 			time_t	time;
 #endif
@@ -111,7 +111,7 @@
 
 			/* hopefully has good resolution */
 #ifdef HAVE_GETTIMEOFDAY
-			(void) gettimeofday( &rdata.tv, sizeof( rdata.tv ) );
+			(void) gettimeofday( &rdata.tv, NULL );
 #else
 			(void) time( &rdata.time );
 #endif