From 09afde568a6869e33893cc32f85768611319f430 Mon Sep 17 00:00:00 2001
From: s_c_c <shichuchao@huawei.com>
Date: Tue, 19 Mar 2024 16:12:51 +0800
Subject: [PATCH] feat for embedded fix sysroot hilog path

---
 interfaces/innerkits/BUILD.gn | 3 ++-
 services/param/base/BUILD.gn  | 5 +++--
 services/utils/BUILD.gn       | 5 +++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn
index aeba5e6..a68eaee 100644
--- a/interfaces/innerkits/BUILD.gn
+++ b/interfaces/innerkits/BUILD.gn
@@ -11,6 +11,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import("//build/ohos.gni")
+import("//build/config/sysroot.gni")
 
 syspara_sources = [
   "syspara/param_comm.c",
@@ -23,7 +24,7 @@ config("exported_header_files") {
     "//base/startup/init/interfaces/innerkits/include",
     "//base/startup/init/interfaces/innerkits/include/syspara",
     "//base/startup/init/services/include",
-    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
+    "${sysroot}/usr/include/hilog",
   ]
 }
 
diff --git a/services/param/base/BUILD.gn b/services/param/base/BUILD.gn
index b253055..178ac87 100644
--- a/services/param/base/BUILD.gn
+++ b/services/param/base/BUILD.gn
@@ -11,6 +11,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import("//build/ohos.gni")
+import("//build/config/sysroot.gni")
 
 config("exported_header_files") {
   visibility = [ ":*" ]
@@ -18,7 +19,7 @@ config("exported_header_files") {
     "//base/startup/init/interfaces/innerkits/include",
     "//base/startup/init/services/include/param",
     "//base/startup/init/services/include",
-    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
+    "${sysroot}/usr/include/hilog",
   ]
 }
 
@@ -29,7 +30,7 @@ comm_sources = [
 base_include_dirs = [
   "//base/startup/init/services/param/include",
   "//base/startup/init/services/param/base",
-  "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
+  "${sysroot}/usr/include/hilog",
 ]
 
 source_set("parameterbase") {
diff --git a/services/utils/BUILD.gn b/services/utils/BUILD.gn
index 11d8bf7..e5f6a96 100644
--- a/services/utils/BUILD.gn
+++ b/services/utils/BUILD.gn
@@ -10,12 +10,13 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import("//build/config/sysroot.gni")
 
 config("exported_header_files") {
   visibility = [ ":*" ]
   include_dirs = [
     "//base/startup/init/services/include",
-    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
+    "${sysroot}/usr/include/hilog",
   ]
 }
 
@@ -26,7 +27,7 @@ ohos_static_library("libinit_utils") {
   include_dirs = [
     "//base/startup/init/interfaces/innerkits/include",
     "//third_party/bounds_checking_function/include",
-    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
+    "${sysroot}/usr/include/hilog",
   ]
   deps = [
     "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
-- 
2.20.1 (Apple Git-117)

