]> source.dussan.org Git - rspamd.git/commitdiff
Add workaround for libevent 1.4.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Sep 2015 14:14:39 +0000 (15:14 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Sep 2015 14:14:39 +0000 (15:14 +0100)
src/libutil/util.c
src/libutil/util.h

index 943c37b081df9870193cf32fa7e889b4941b40aa..b537643cac4938242f88612cb56a2777046196d8 100644 (file)
@@ -1963,3 +1963,11 @@ rspamd_time_jitter (gdouble in, gdouble jitter)
 
        return in + jitter * res;
 }
+
+#if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 0x02000000UL
+struct event_base *
+event_get_base (struct event *ev)
+{
+       return ev->ev_base;
+}
+#endif
index 0903c23e5f74dd9718fd78e11281518c43dd5443..536caed2c1ee6429f7218c99618a8c768f2670e1 100644 (file)
@@ -396,4 +396,9 @@ guint64 rspamd_hash_seed (void);
  */
 gdouble rspamd_time_jitter (gdouble in, gdouble jitter);
 
+/* Special case for ancient libevent */
+#if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 0x02000000UL
+struct event_base * event_get_base (struct event *ev);
+#endif
+
 #endif