Explorar o código

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 %!s(int64=16) %!d(string=hai) anos
pai
achega
0d5ff48b92
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 }