diff options
Diffstat (limited to 'src/util/verto/verto-k5ev.c')
-rw-r--r-- | src/util/verto/verto-k5ev.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/util/verto/verto-k5ev.c b/src/util/verto/verto-k5ev.c index 74fa368a83b3..a390af716616 100644 --- a/src/util/verto/verto-k5ev.c +++ b/src/util/verto/verto-k5ev.c @@ -36,12 +36,29 @@ #include <verto.h> #include <verto-module.h> #include "rename.h" + +/* Ignore some warnings generated by the libev code, which the libev maintainer + * isn't interested in avoiding. */ +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wunused-value" +#pragma GCC diagnostic ignored "-Wcomment" +#pragma GCC diagnostic ignored "-Wunused-result" +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wbitwise-op-parentheses" +#endif +#endif + #define EV_API_STATIC 1 #define EV_STANDALONE 1 /* Avoid using clock_gettime, which would create a dependency on librt. */ #define EV_USE_MONOTONIC 0 #define EV_USE_REALTIME 0 -#define EV_FEATURES 0x5f /* Everything but back ends */ +#define EV_FEATURES 0x4f /* No back ends or optional watchers */ +/* Enable the optional watcher types we use. */ +#define EV_IDLE_ENABLE 1 +#define EV_SIGNAL_ENABLE 1 +#define EV_CHILD_ENABLE 1 +/* Enable the back ends we want. */ #ifdef HAVE_POLL_H #define EV_USE_POLL 1 #endif @@ -97,6 +114,11 @@ libev_callback(EV_P_ ev_watcher *w, int revents) { verto_ev_flag state = VERTO_EV_FLAG_NONE; +#if EV_MULTIPLICITY + /* Match the check in ev.h, which doesn't mark this unused */ + (void) EV_A; +#endif + if (verto_get_type(w->data)== VERTO_EV_TYPE_CHILD) verto_set_proc_status(w->data, ((ev_child*) w)->rstatus); |