summaryrefslogtreecommitdiff
path: root/evutil.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-12-30 14:29:56 -0500
committerNick Mathewson <nickm@torproject.org>2009-12-30 14:29:56 -0500
commit165d30e31a167215c03a9104423f2767c9ff9c9a (patch)
tree8fcb5f002fe9a1e15f65b7f14539bc8db25e9ad6 /evutil.c
parent885b42734c2360e95b9acb7a5b202262f24b7626 (diff)
downloadlibevent-165d30e31a167215c03a9104423f2767c9ff9c9a.tar.gz
Fix compilation of rate-limiting code on win32.
Diffstat (limited to 'evutil.c')
-rw-r--r--evutil.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/evutil.c b/evutil.c
index 800e40b2..8df742a7 100644
--- a/evutil.c
+++ b/evutil.c
@@ -1759,3 +1759,14 @@ evutil_getenv(const char *varname)
return getenv(varname);
}
+
+long
+_evutil_weakrand(void)
+{
+#ifdef WIN32
+ return rand();
+#else
+ return random();
+#endif
+}
+