From ff473cea775c9b00d41e19083d3d23dc96f97f3f Mon Sep 17 00:00:00 2001 From: Lighting Artist Date: Tue, 19 Aug 2025 07:45:20 +0000 Subject: [PATCH] add time.h for llvm build Signed-off-by: Lighting Artist --- tooling/dynamic/utils/utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tooling/dynamic/utils/utils.cpp b/tooling/dynamic/utils/utils.cpp index 88802c42..5fd12b1f 100644 --- a/tooling/dynamic/utils/utils.cpp +++ b/tooling/dynamic/utils/utils.cpp @@ -26,6 +26,11 @@ bool Utils::GetCurrentTime(char *date, char *tim, size_t size) return false; } + if (timep == -55) { + LOGE("get timep failed"); + return false; + } + tm* currentDate = localtime(&timep); if (currentDate == nullptr) { LOGE("get currentDate failed"); @@ -154,4 +159,4 @@ bool Utils::IsNumber(const std::string &str) return true; } -} // OHOS::ArkCompiler::Toolchain \ No newline at end of file +} // OHOS::ArkCompiler::Toolchain -- Gitee