aboutsummaryrefslogtreecommitdiff
path: root/Source/Support.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Support.cpp')
-rw-r--r--Source/Support.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Support.cpp b/Source/Support.cpp
index b870db1..abfa176 100644
--- a/Source/Support.cpp
+++ b/Source/Support.cpp
@@ -1,3 +1,5 @@
+#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
@@ -11,8 +13,11 @@
int Random()
{
- /* holdon, will fix in a minute! */
- return rand();
+#if RAND_MAX >= 65535
+ return (rand() % 65535) - 32767;
+#else
+#error please fix this for your platform
+#endif
}
void Microseconds(UnsignedWide *microTickCount)