From 4b8bf88c96deb2081b796148ea405b767249ab74 Mon Sep 17 00:00:00 2001
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Date: Tue, 4 Dec 2018 23:44:17 +0300
Subject: [PATCH] evio: turn into C

Needed for #3234
---
 src/CMakeLists.txt      | 2 +-
 src/{evio.cc => evio.c} | 5 +++--
 src/evio.h              | 9 +++++++++
 3 files changed, 13 insertions(+), 3 deletions(-)
 rename src/{evio.cc => evio.c} (99%)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e431d1f57c..04de5ad04a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -90,7 +90,7 @@ set (core_sources
      fiber_channel.c
      latch.c
      sio.c
-     evio.cc
+     evio.c
      coio.cc
      coio_task.c
      coio_file.c
diff --git a/src/evio.cc b/src/evio.c
similarity index 99%
rename from src/evio.cc
rename to src/evio.c
index d69442c7e0..36dd924f4e 100644
--- a/src/evio.cc
+++ b/src/evio.c
@@ -167,9 +167,10 @@ evio_service_name(struct evio_service *service)
  * callback.
  */
 static void
-evio_service_accept_cb(ev_loop * /* loop */, ev_io *watcher,
-		       int /* revents */)
+evio_service_accept_cb(ev_loop *loop, ev_io *watcher, int events)
 {
+	(void) loop;
+	(void) events;
 	struct evio_service *service = (struct evio_service *) watcher->data;
 	int fd;
 	while (1) {
diff --git a/src/evio.h b/src/evio.h
index 6c5e54ea4d..69d641a603 100644
--- a/src/evio.h
+++ b/src/evio.h
@@ -38,6 +38,11 @@
 #include "tarantool_ev.h"
 #include "sio.h"
 #include "uri.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif /* defined(__cplusplus) */
+
 /**
  * A way to add a listening socket to the event loop. Callbacks
  * are invoked on bind and accept events.
@@ -152,4 +157,8 @@ evio_timeout_update(ev_loop *loop, ev_tstamp start, ev_tstamp *delay)
 int
 evio_setsockopt_client(int fd, int family, int type);
 
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
 #endif /* TARANTOOL_EVIO_H_INCLUDED */
-- 
GitLab