Преглед изворни кода

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 пре 15 година
родитељ
комит
0d5ff48b92
1 измењених фајлова са 1 додато и 1 уклоњено
  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;
 }