]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a compile error when building with Libevent before 1.4.5-stable
authorNick Mathewson <nickm@torproject.org>
Fri, 25 Jun 2010 20:14:21 +0000 (16:14 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 25 Jun 2010 20:14:21 +0000 (16:14 -0400)
Older versions of Libevent forgot to declare enough function arguments
constant.

src/common/compat_libevent.c

index eaff7d7393ec61caea5c88fa660b6d2f619258ef..1532392279cca772515babf1866e09d729a5bc28 100644 (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;
 }