From 85d308cec85ff00b141e6b7c6ccb2a4c7c7bec51 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Mon, 13 Sep 2021 20:19:00 +0200
Subject: [PATCH] Use libuv >= 1.3.0
---
cmake/libpoly.cmake | 2 +-
src/components/controller.cpp | 4 ++--
src/components/eventloop.cpp | 4 ++++
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cmake/libpoly.cmake b/cmake/libpoly.cmake
index 0b759f38..d7ec359e 100644
--- a/cmake/libpoly.cmake
+++ b/cmake/libpoly.cmake
@@ -48,7 +48,7 @@ endif()
find_package(Threads REQUIRED)
find_package(CairoFC REQUIRED)
-find_package(LibUV 1.8.0 REQUIRED)
+find_package(LibUV 1.3.0 REQUIRED)
if (ENABLE_ALSA)
find_package(ALSA REQUIRED)
diff --git a/src/components/controller.cpp b/src/components/controller.cpp
index 494e7f35..d090f259 100644
--- a/src/components/controller.cpp
+++ b/src/components/controller.cpp
@@ -253,8 +253,8 @@ void controller::read_events(bool confwatch) {
if (confwatch) {
eloop->fs_event_handle(
m_conf.filepath(), [this](const char* path, uv_fs_event events) { confwatch_handler(path, events); },
- [this](int status) {
- m_log.err("libuv error while watching config file for changes: %s", uv_strerror(status));
+ [this](int err) {
+ m_log.err("libuv error while watching config file for changes: %s", uv_strerror(err));
});
}
diff --git a/src/components/eventloop.cpp b/src/components/eventloop.cpp
index 6e4359ce..cca21ebb 100644
--- a/src/components/eventloop.cpp
+++ b/src/components/eventloop.cpp
@@ -4,6 +4,10 @@
#include "errors.hpp"
+#if !(UV_VERSION_MAJOR == 1 && UV_VERSION_MINOR >= 3)
+#error "Polybar requires libuv 1.x and at least version 1.3"
+#endif
+
POLYBAR_NS
/**