diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-12-30 13:50:52 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-12-30 13:50:52 -0500 |
commit | 885b42734c2360e95b9acb7a5b202262f24b7626 (patch) | |
tree | 1be9b79f6bc9e0596885887a47a2f81545afe001 | |
parent | 82743794d37b0ddece31c0d4f637d2f7d0896f2d (diff) | |
download | libevent-885b42734c2360e95b9acb7a5b202262f24b7626.tar.gz |
Fix test-ratelim compilation on Linux.
I'd forgotten to include time.h, and to link against libm.
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/test-ratelim.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index a58539cf..5d2eab77 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -18,7 +18,7 @@ test_weof_LDADD = ../libevent_core.la test_time_SOURCES = test-time.c test_time_LDADD = ../libevent_core.la test_ratelim_SOURCES = test-ratelim.c -test_ratelim_LDADD = ../libevent_core.la +test_ratelim_LDADD = ../libevent_core.la -lm regress_SOURCES = regress.c regress_buffer.c regress_http.c regress_dns.c \ regress_rpc.c regress.gen.c regress.gen.h regress_et.c \ diff --git a/test/test-ratelim.c b/test/test-ratelim.c index d252e946..845e7504 100644 --- a/test/test-ratelim.c +++ b/test/test-ratelim.c @@ -312,7 +312,11 @@ main(int argc, char **argv) cfg_connlimit *= ratio; cfg_grouplimit *= ratio; - srandom(time(NULL)); + { + struct timeval tv; + evutil_gettimeofday(&tv, NULL); + srandom(tv.tv_usec); + } evthread_enable_lock_debuging(); |