Hello,

We get a new gcc warning with the latest libev:

libev/ev.c:1264:25:
warning: ‘ev_rt_now’ initialized and declared ‘extern’ [enabled by
default]

We don't use EV_API_STATIC, so EV_API_DECL is defined to 'extern'.

Please consider the below patch as a fix:


diff --git a/third_party/libev/ev.c b/third_party/libev/ev.c
index 449556d..0a05509 100644
--- a/third_party/libev/ev.c
+++ b/third_party/libev/ev.c
@@ -1257,11 +1257,11 @@ typedef struct
   #include "ev_wrap.h"
 
   static struct ev_loop default_loop_struct;
-  EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be 
initialised to make it a definition despite extern */
+  EV_API_DEF struct ev_loop *ev_default_loop_ptr = 0; /* needs to be 
initialised to make it a definition despite extern */
 
 #else
 
-  EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a 
definition despite extern */
+  EV_API_DEF ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a 
definition despite extern */
   #define VAR(name,decl) static decl;
     #include "ev_vars.h"
   #undef VAR
diff --git a/third_party/libev/ev.h b/third_party/libev/ev.h
index a8973ab..421946e 100644
--- a/third_party/libev/ev.h
+++ b/third_party/libev/ev.h
@@ -193,8 +193,10 @@ struct ev_loop;
 
 #ifdef EV_API_STATIC
 # define EV_API_DECL static
+# define EV_API_DEF static
 #else
 # define EV_API_DECL extern
+# define EV_API_DEF
 #endif
 
 /* EV_PROTOTYPES can be used to switch of prototype declarations */

-- 
http://tarantool.org - an efficient, extensible in-memory data store

_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to