!16 修复unused variable编译错误和include_dirs路径以适配嵌入式环境

From: @s-c-c 
Reviewed-by: @yukaii 
Signed-off-by: @yukaii
This commit is contained in:
openeuler-ci-bot 2024-08-22 02:50:26 +00:00 committed by Gitee
commit 5b10cb74eb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 75 additions and 2 deletions

View File

@ -0,0 +1,67 @@
From bf69a1d308580601b364134f91f444d7a7894534 Mon Sep 17 00:00:00 2001
From: s_c_c <shichuchao@huawei.com>
Date: Mon, 24 Jun 2024 17:12:31 +0800
Subject: [PATCH] feat for embedded fix device manager compile error
---
interfaces/inner_kits/native_cpp/BUILD.gn | 4 ++++
services/service/BUILD.gn | 5 +++++
utils/BUILD.gn | 4 ++++
3 files changed, 13 insertions(+)
diff --git a/interfaces/inner_kits/native_cpp/BUILD.gn b/interfaces/inner_kits/native_cpp/BUILD.gn
index 81ea6a6..f215264 100644
--- a/interfaces/inner_kits/native_cpp/BUILD.gn
+++ b/interfaces/inner_kits/native_cpp/BUILD.gn
@@ -147,6 +147,10 @@ if (defined(ohos_lite)) {
"LOG_DOMAIN=0xD004100",
]
+ cflags = [
+ "-Wno-unused-variable",
+ ]
+
external_deps = [
"c_utils:utils",
# "hisysevent_native:libhisysevent",
diff --git a/services/service/BUILD.gn b/services/service/BUILD.gn
index fd7bb18..e10f99f 100644
--- a/services/service/BUILD.gn
+++ b/services/service/BUILD.gn
@@ -222,6 +222,10 @@ if (defined(ohos_lite)) {
"LOG_DOMAIN=0xD004100",
]
+ cflags = [
+ "-Wno-unused-variable",
+ ]
+
external_deps = [
"c_utils:utils",
"dsoftbus:softbus_client",
@@ -230,6 +234,7 @@ if (defined(ohos_lite)) {
"init:libbegetutil",
"ipc:ipc_core",
"safwk:system_ability_fwk",
+ "samgr:samgr_proxy",
]
subsystem_name = "distributedhardware"
diff --git a/utils/BUILD.gn b/utils/BUILD.gn
index 59e9e9b..e9b43e2 100644
--- a/utils/BUILD.gn
+++ b/utils/BUILD.gn
@@ -178,6 +178,10 @@ if (defined(ohos_lite)) {
"LOG_DOMAIN=0xD004100",
]
+ cflags = [
+ "-Wno-unused-variable",
+ ]
+
deps = [ "//third_party/mbedtls:mbedtls_shared" ]
external_deps = [
--
2.45.2.windows.1

View File

@ -12,10 +12,11 @@
# limitations under the License.
import("//build/ohos.gni")
import("//build/config/sysroot.gni")
config("devicemanagersdk_config") {
include_dirs = [
"include"
"${sysroot}/usr/include/device_manager"
]
libs = ["devicemanagersdk.z"]
}

View File

@ -8,7 +8,7 @@
Name: distributedhardware_device_manager
Version: 1.0.0
Release: 6
Release: 7
Summary: Distributed middleware used components.
License: Apache-2.0
Url: https://gitee.com/openharmony/
@ -23,6 +23,7 @@ Patch2: 0002-device-manager-only-support-for-network.patch
Patch3: 0003-Fix-crash-for-nullptr-in-EstablishAuthChannel.patch
Patch4: 0004-Add-placeholder-for-the-string-of-params.patch
Patch5: 0005-release-handle-when-dlerror-returns-non-nullptr.patch
Patch6: 0006-feat-for-embedded-fix-device-manager-compile-error.patch
BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks
BuildRequires: distributed-build, distributed-beget
@ -60,6 +61,7 @@ cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}
%patch -P3 -p1 -d %{distributedhardware_dir}/device_manager
%patch -P4 -p1 -d %{distributedhardware_dir}/device_manager
%patch -P5 -p1 -d %{distributedhardware_dir}/device_manager
%patch -P6 -p1 -d %{distributedhardware_dir}/device_manager
%setup -q -D -T -a 2 -c -n %{third_party_dir}/
@ -122,6 +124,9 @@ ln -s /usr/include/device_manager %{buildroot}%{build_opt}/openeuler/compiler_gn
/system/*
%changelog
* Mon Jun 24 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-7
- Fix unused variable and include_dirs errors for embedded
* Wed May 29 2024 wei_jiangang <wei_jiangang@hoperun.com> - 1.0.0-6
- release handle when dlerror returns non-nullptr
* Mon Apr 1 2024 wei_jiangang <wei_jiangang@hoperun.com> - 1.0.0-5