kea: fix compilation with boost 1.89
authorRosen Penev <[email protected]>
Sat, 11 Oct 2025 20:36:28 +0000 (13:36 -0700)
committerTianling Shen <[email protected]>
Thu, 16 Oct 2025 18:33:21 +0000 (02:33 +0800)
system goes header only.

Added small patch to get rid of deadline_timer. It's gone.

Signed-off-by: Rosen Penev <[email protected]>
net/kea/Makefile
net/kea/patches/040-boost-189.patch [new file with mode: 0644]

index accd1f1ef39070dd1b1a0089be2ec5c34fb39e89..a08220b3850575a0729076d7ca9c51caca18e00d 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kea
 PKG_VERSION:=2.6.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)
@@ -20,13 +20,11 @@ PKG_MAINTAINER:=BangLang Huang <[email protected]>, Rosy Song <rosysong
 PKG_LICENSE:=MPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=boost
 PKG_BUILD_FLAGS:=gc-sections
 
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/kea/Default
@@ -193,6 +191,7 @@ endef
 ###### *************************************************************************
 
 CONFIGURE_ARGS += \
+       --enable-boost-headers-only \
        --with-boost-include="$(STAGING_DIR)/usr" \
        --with-log4cplus="$(STAGING_DIR)/usr" \
        --with-openssl="$(STAGING_DIR)/usr" \
diff --git a/net/kea/patches/040-boost-189.patch b/net/kea/patches/040-boost-189.patch
new file mode 100644 (file)
index 0000000..20e1677
--- /dev/null
@@ -0,0 +1,40 @@
+--- a/src/lib/asiodns/io_fetch.cc
++++ b/src/lib/asiodns/io_fetch.cc
+@@ -67,7 +67,7 @@ struct IOFetchData : boost::noncopyable
+     OutputBufferPtr               msgbuf;            // Wire buffer for question
+     OutputBufferPtr               received;          // Received data put here
+     IOFetch::Callback*            callback;          // Called on I/O Completion
+-    boost::asio::deadline_timer   timer;             // Timer to measure timeouts
++    boost::asio::steady_timer     timer;             // Timer to measure timeouts
+     IOFetch::Protocol             protocol;          // Protocol being used
+     size_t                        cumulative;        // Cumulative received amount
+     size_t                        expected;          // Expected amount of data
+@@ -227,7 +227,7 @@ IOFetch::operator()(boost::system::error
+         // If we timeout, we stop, which cancels outstanding I/O operations and
+         // shuts down everything.
+         if (data_->timeout != -1) {
+-            data_->timer.expires_from_now(boost::posix_time::milliseconds(
++            data_->timer.expires_after(std::chrono::milliseconds(
+                 data_->timeout));
+             data_->timer.async_wait(std::bind(&IOFetch::stop, *this,
+                 TIME_OUT));
+--- a/src/lib/asiolink/interval_timer.cc
++++ b/src/lib/asiolink/interval_timer.cc
+@@ -88,7 +88,7 @@ private:
+     IOServicePtr io_service_;
+     /// @brief The asio timer.
+-    boost::asio::deadline_timer timer_;
++    boost::asio::steady_timer timer_;
+     /// @brief Controls how the timer behaves after expiration.
+     IntervalTimer::Mode mode_;
+@@ -141,7 +141,7 @@ void
+ IntervalTimerImpl::update() {
+     try {
+         // Update expire time to (current time + interval_).
+-        timer_.expires_from_now(boost::posix_time::millisec(long(interval_)));
++        timer_.expires_after(std::chrono::milliseconds(interval_));
+         // Reset timer.
+         // Pass a function bound with a shared_ptr to this.
+         timer_.async_wait(std::bind(&IntervalTimerImpl::callback,