mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
Fix test-ratelim compilation on Linux.
I'd forgotten to include time.h, and to link against libm.
This commit is contained in:
parent
82743794d3
commit
885b42734c
@ -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 \
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user