Browse Source

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

Older versions of Libevent forgot to declare enough function arguments
constant.
Nick Mathewson 14 years ago
parent
commit
0d5ff48b92
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/compat_libevent.c

+ 1 - 1
src/common/compat_libevent.c

@@ -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;
 }