Group :: System/Servers
RPM: woadaptor
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: woadaptor-5.4-alt-fixes.patch
Download
Download
diff --git a/Adaptors/Adaptor/random.c b/Adaptors/Adaptor/random.c
index bcb1fde..2be65f9 100644
--- a/Adaptors/Adaptor/random.c
+++ b/Adaptors/Adaptor/random.c
@@ -35,6 +35,7 @@ and limitations under the License.
#if defined(WIN32)
#include <windows.h>
/* Windows doesn't have random(). */
+#define srandom(x) srand(x)
#define random() rand()
#endif
@@ -42,14 +43,10 @@ and limitations under the License.
static int rnd_initialize(strtbl *options)
{
- int ret = 0;
-#if defined(WIN32)
+ int ret = 0;
time_t now;
time(&now);
- srand(now);
-#else
- srandomdev();
-#endif
+ srandom(now);
return ret;
}