--- libev/ev.h 2007/11/12 21:51:14 1.57 +++ libev/ev.h 2007/11/15 09:19:43 1.58 @@ -269,7 +269,17 @@ # if EV_MULTIPLICITY /* the default loop is the only one that handles signals and child watchers */ /* you can call this as often as you like */ -struct ev_loop *ev_default_loop (unsigned int flags); /* returns default loop */ +static struct ev_loop * +ev_default_loop (unsigned int flags) +{ + extern struct ev_loop *ev_default_loop_ptr; + extern struct ev_loop *ev_default_loop_ (unsigned int flags); + + if (!ev_default_loop_ptr) + ev_default_loop_ (flags); + + return ev_default_loop_ptr; +} /* create and destroy alternative loops that don't handle signals */ struct ev_loop *ev_loop_new (unsigned int flags);