https://bugs.gentoo.org/963975
Fixes the build with Boost 1.89
diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4
index 996413374a..7d616eb03e 100644
--- a/m4macros/ax_boost_for_kea.m4
+++ b/m4macros/ax_boost_for_kea.m4
@@ -205,7 +205,7 @@ AC_ARG_ENABLE([boost-headers-only],
          as it may result in non-optimized code on some
          platforms or introduce runtime errors on others.])],
     [enable_boost_header="yes"; BOOST_LIBS=""],
-    [BOOST_LIBS="${BOOST_LIBS} -lboost_system"])
+    [BOOST_LIBS="${BOOST_LIBS}"])
 
 # BOOST_ERROR_CODE_HEADER_ONLY in versions below Boost 1.56.0 can fail
 # to find the error_code.cpp file.
diff --git a/src/lib/asiodns/io_fetch.cc b/src/lib/asiodns/io_fetch.cc
index 742abc66e9..d87e4abdcc 100644
--- a/src/lib/asiodns/io_fetch.cc
+++ b/src/lib/asiodns/io_fetch.cc
@@ -24,6 +24,7 @@
 
 #include <boost/scoped_ptr.hpp>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/asio/deadline_timer.hpp>
 
 #include <functional>
 #include <unistd.h>             // for some IPC/network system calls
diff --git a/src/lib/asiodns/tests/io_fetch_unittest.cc b/src/lib/asiodns/tests/io_fetch_unittest.cc
index e93e796ae9..c968b45c02 100644
--- a/src/lib/asiodns/tests/io_fetch_unittest.cc
+++ b/src/lib/asiodns/tests/io_fetch_unittest.cc
@@ -21,6 +21,7 @@
 
 #include <gtest/gtest.h>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/asio/deadline_timer.hpp>
 
 #include <algorithm>
 #include <cstdlib>
diff --git a/src/lib/asiolink/interval_timer.cc b/src/lib/asiolink/interval_timer.cc
index fa0d9e1b67..4ac0b20c7d 100644
--- a/src/lib/asiolink/interval_timer.cc
+++ b/src/lib/asiolink/interval_timer.cc
@@ -12,6 +12,7 @@
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/shared_ptr.hpp>
+#include <boost/asio/deadline_timer.hpp>
 
 #include <exceptions/exceptions.h>
 
