From 98245fdeac79a5f69811291bf92e8ff96499bb83 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 18 Jun 2020 16:46:22 +0200 Subject: [PATCH] TT#83954 Invoke libevent_global_shutdown() only conditionally Commit a6d2f9296 introduced usage of libevent_global_shutdown(), which is available in libevent-dev >=2.1.1-alpha only. For example travis CI is running Ubuntu 16.04 / xenial and ships libevent-dev 2.0.21-stable-2, so we can't just raise the build-dependency of libevent-dev to >= 2.1.1+ if we still want to support older systems. Change-Id: I9dcf9ca0a19f59051d42f0d2383d1938b60a97df --- daemon/redis.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/redis.c b/daemon/redis.c index 7ef0d50ed..a0c2a1ece 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -632,7 +632,9 @@ void redis_notify_loop(void *d) { } // free libevent +#if LIBEVENT_VERSION_NUMBER >= 0x02010100 libevent_global_shutdown(); +#endif // unsubscribe notifications redis_notify_subscribe_action(UNSUBSCRIBE_ALL, 0);