I'd forgotten to include time.h, and to link against libm.
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 \
cfg_connlimit *= ratio;
cfg_grouplimit *= ratio;
- srandom(time(NULL));
+ {
+ struct timeval tv;
+ evutil_gettimeofday(&tv, NULL);
+ srandom(tv.tv_usec);
+ }
evthread_enable_lock_debuging();