From 6be09bf81cc2798f27419f5768da71a269949142 Mon Sep 17 00:00:00 2001 From: panzhenyu1 Date: Mon, 7 Mar 2022 15:27:48 +0800 Subject: [PATCH] Bugfix for windows support patch Description: add output_extension = "so" and fix typo bug about ICU path related issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4WNRU Signed-off-by: panzhenyu1 Change-Id: If8806daf2e99278d3443bd839c0be9a1d9f69e07 Signed-off-by: panzhenyu1 --- BUILD.gn | 3 +++ ecmascript/builtins.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index cf253c611..59a436e8b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -532,6 +532,9 @@ ohos_shared_library("libark_jsruntime") { install_enable = true part_name = "ark_js_runtime" + if (!is_mingw) { + output_extension = "so" + } if (!is_standard_system) { relative_install_dir = "ark" } diff --git a/ecmascript/builtins.cpp b/ecmascript/builtins.cpp index bacfc5532..724c7f336 100644 --- a/ecmascript/builtins.cpp +++ b/ecmascript/builtins.cpp @@ -160,7 +160,7 @@ bool GetAbsolutePath(const std::string &relativePath, std::string &absPath) absPath = std::string(path); return true; #else - auto path = _fullpath(buffer, relativePath.c_str(), buffer.size() - 1); + auto path = _fullpath(buffer, relativePath.c_str(), sizeof(buffer) - 1); if (path == nullptr) { return false; } -- Gitee