diff --git a/CHANGELOG.md b/CHANGELOG.md index b1a010bb0..850847ff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # v2.5.1 +- [#454](https://github.com/xmrig/xmrig/issues/454) Fixed build with libmicrohttpd version below v0.9.35. - [#456](https://github.com/xmrig/xmrig/issues/459) Verbose errors related to donation pool was not fully silenced. - [#459](https://github.com/xmrig/xmrig/issues/459) Fixed regression (version 2.5.0 affected) with connection to **xmr.f2pool.com**. diff --git a/src/api/Httpd.cpp b/src/api/Httpd.cpp index a604b5de3..861086ed9 100644 --- a/src/api/Httpd.cpp +++ b/src/api/Httpd.cpp @@ -45,17 +45,17 @@ bool Httpd::start() return false; } - unsigned int flags = 0; + unsigned int flags = MHD_USE_SELECT_INTERNALLY; + +# if MHD_VERSION >= 0x00093500 if (MHD_is_feature_supported(MHD_FEATURE_EPOLL)) { flags = MHD_USE_EPOLL_LINUX_ONLY | MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY; } - else { - flags = MHD_USE_SELECT_INTERNALLY; - } if (MHD_is_feature_supported(MHD_FEATURE_IPv6)) { flags |= MHD_USE_DUAL_STACK; } +# endif m_daemon = MHD_start_daemon(flags, m_port, nullptr, nullptr, &Httpd::handler, this, MHD_OPTION_END); if (!m_daemon) {