Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37880722
en ru br
ALT Linux repos
S:6.1.4-alt1

Group :: System/Servers
RPM: woadaptor

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: woadaptor-5.4-alt-fixes.patch
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;
 }
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin