Fix test-ratelim compilation on Linux.

I'd forgotten to include time.h, and to link against libm.
This commit is contained in:
Nick Mathewson 2009-12-30 13:50:52 -05:00
parent 82743794d3
commit 885b42734c
2 changed files with 6 additions and 2 deletions

View File

@ -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 \

View File

@ -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();