]> git.mxchange.org Git - simgear.git/commitdiff
rand(), not random(), for Windows.
authorJames Turner <zakalawe@mac.com>
Thu, 19 Sep 2013 07:57:34 +0000 (08:57 +0100)
committerJames Turner <zakalawe@mac.com>
Thu, 19 Sep 2013 07:57:34 +0000 (08:57 +0100)
simgear/io/HTTPClient.cxx

index 037b1283677091be09b9f4417855c64dcf806e56..0630af32cc5d2b2242aaac8437bf23a00a9bfd78 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <sstream>
 #include <cassert>
+#include <cstdlib> // rand()
 #include <list>
 #include <iostream>
 #include <errno.h>
@@ -840,7 +841,7 @@ void Client::makeRequest(const Request_ptr& r)
             // we have at least one connection to the host, but they are
             // all active - we need to pick one to queue the request on.
             // we use random but round-robin would also work.
-            int index = random() % count;
+            int index = rand() % count;
             for (it = d->connections.find(connectionId); index > 0; --index) { ; }
             con = it->second;
         }