From 298354973a14d036d9906a95bdde677f395ad6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=A4=B4=E4=BA=91?= <372449116@qq.com> Date: Mon, 15 Dec 2025 09:47:39 +0000 Subject: [PATCH] fix(log): add missing LIBIPC_LOG() in posix get_wait_time.h - Add LIBIPC_LOG() to calc_wait_time() function - Add LIBIPC_LOG() to make_timespec() function - Both functions use log.error() and need the logger initialization --- src/libipc/platform/posix/get_wait_time.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libipc/platform/posix/get_wait_time.h b/src/libipc/platform/posix/get_wait_time.h index 2e5e76d..889804a 100644 --- a/src/libipc/platform/posix/get_wait_time.h +++ b/src/libipc/platform/posix/get_wait_time.h @@ -14,6 +14,7 @@ namespace posix_ { namespace detail { inline bool calc_wait_time(timespec &ts, std::uint64_t tm /*ms*/) noexcept { + LIBIPC_LOG(); timeval now; int eno = ::gettimeofday(&now, NULL); if (eno != 0) { @@ -27,6 +28,7 @@ inline bool calc_wait_time(timespec &ts, std::uint64_t tm /*ms*/) noexcept { } inline timespec make_timespec(std::uint64_t tm /*ms*/) noexcept(false) { + LIBIPC_LOG(); timespec ts {}; if (!calc_wait_time(ts, tm)) { log.error("fail calc_wait_time: tm = ", tm, ", tv_sec = ", ts.tv_sec, ", tv_nsec = ", ts.tv_nsec);