Przeglądaj źródła

Compat with libuv 0.11 (Unstable)

Fixes #241
Nils Maier 11 lat temu
rodzic
commit
0b6501043a
1 zmienionych plików z 11 dodań i 0 usunięć
  1. 11 0
      src/LibuvEventPoll.cc

+ 11 - 0
src/LibuvEventPoll.cc

@@ -66,10 +66,21 @@ namespace {
     delete reinterpret_cast<T*>(handle);
   }
 
+#if !defined(UV_VERSION_MINOR) || UV_VERSION_MINOR <= 10
+
   static void timer_callback(uv_timer_t* handle, int status)
   {
     uv_stop(handle->loop);
   }
+
+#else // !defined(UV_VERSION_MINOR) || UV_VERSION_MINOR <= 10
+
+  static void timer_callback(uv_timer_t* handle)
+  {
+    uv_stop(handle->loop);
+  }
+
+#endif // !defined(UV_VERSION_MINOR) || UV_VERSION_MINOR <= 10
 }
 
 namespace aria2 {