[CLN-list] CLN on MINGW

David Robinow drobinow at gmail.com
Tue Aug 23 17:44:06 CEST 2005


 The following patch allows building on Windows under MSYS.
make check succeeds.

--- /c/home/cln_cvs/cln/src/base/random/cl_random_from.cc	2004-06-23
17:11:21.000000000 -0400
+++ cl_random_from.cc	2005-08-23 11:31:13.938737700 -0400
@@ -50,6 +50,14 @@
 	return seed_lo + tmsbuf.tms_utime + tmsbuf.tms_stime;
 }
 
+#elif defined(__MINGW32__)
+#include <sys/timeb.h>
+inline uint32 get_seed (void)
+{
+	struct timeb tm;
+	ftime(&tm);
+	return cln::highlow32(tm.time,tm.millitm * 1000);
+}
 #endif
 
 #endif




More information about the CLN-list mailing list