Fix a compile error when building with Libevent before 1.4.5-stable

Older versions of Libevent forgot to declare enough function arguments
constant.
This commit is contained in:
Nick Mathewson 2010-06-25 16:14:21 -04:00
parent ad2d8ac073
commit 0d5ff48b92

View File

@ -535,7 +535,7 @@ periodic_timer_new(struct event_base *base,
#ifndef HAVE_PERIODIC
memcpy(&timer->tv, tv, sizeof(struct timeval));
#endif
event_add(timer->ev, tv);
event_add(timer->ev, (struct timeval *)tv); /*drop const for old libevent*/
return timer;
}