Fix ipc and dsoftbus compile errors for embedded
This commit is contained in:
parent
a1e6b35acb
commit
c9aec8165d
25
0005-feat-for-embedded-fix-ipc-compile-error.patch
Normal file
25
0005-feat-for-embedded-fix-ipc-compile-error.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 418c6f30c6e8daf69cef14c1afd6924eb9634e6d Mon Sep 17 00:00:00 2001
|
||||
From: s_c_c <shichuchao@huawei.com>
|
||||
Date: Fri, 22 Mar 2024 11:19:48 +0800
|
||||
Subject: [PATCH] feat for embedded fix ipc compile error
|
||||
|
||||
---
|
||||
ipc/native/src/mock/source/binder_invoker.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ipc/native/src/mock/source/binder_invoker.cpp b/ipc/native/src/mock/source/binder_invoker.cpp
|
||||
index 946940c..75e4010 100644
|
||||
--- a/ipc/native/src/mock/source/binder_invoker.cpp
|
||||
+++ b/ipc/native/src/mock/source/binder_invoker.cpp
|
||||
@@ -746,7 +746,7 @@ int BinderInvoker::WaitForCompletion(MessageParcel *reply, int32_t *acquireResul
|
||||
case BR_ACQUIRE_RESULT: {
|
||||
int32_t result = input_.ReadInt32();
|
||||
if (acquireResult != nullptr) {
|
||||
- *acquireResult = result ? ERR_NONE : ERR_INVALID_OPERATION;
|
||||
+ *acquireResult = result ? (int32_t)ERR_NONE : (int32_t)ERR_INVALID_OPERATION;
|
||||
continueLoop = false;
|
||||
}
|
||||
break;
|
||||
--
|
||||
2.20.1 (Apple Git-117)
|
||||
|
||||
90
0006-feat-for-embedded-fix-dsoftbus-compile-errors.patch
Normal file
90
0006-feat-for-embedded-fix-dsoftbus-compile-errors.patch
Normal file
@ -0,0 +1,90 @@
|
||||
From 6954a88be47ff349b22a6a8668f84ae0d745a294 Mon Sep 17 00:00:00 2001
|
||||
From: s_c_c <shichuchao@huawei.com>
|
||||
Date: Fri, 22 Mar 2024 14:58:13 +0800
|
||||
Subject: [PATCH] feat for embedded fix dsoftbus compile errors
|
||||
|
||||
---
|
||||
.../nstackx/fillp/src/fillp_lib/src/fillp/fillp_input.c | 2 +-
|
||||
components/nstackx/nstackx_ctrl/core/coap_discover/coap_app.c | 4 ++--
|
||||
core/common/dfx/hisysevent_adapter/softbus_hisysevt_nstack.c | 4 ++--
|
||||
sdk/BUILD.gn | 1 +
|
||||
.../trans_channel/proxy/src/client_trans_proxy_file_manager.c | 3 ++-
|
||||
5 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/components/nstackx/fillp/src/fillp_lib/src/fillp/fillp_input.c b/components/nstackx/fillp/src/fillp_lib/src/fillp/fillp_input.c
|
||||
index 2c0d51f..4123ac4 100644
|
||||
--- a/components/nstackx/fillp/src/fillp_lib/src/fillp/fillp_input.c
|
||||
+++ b/components/nstackx/fillp/src/fillp_lib/src/fillp/fillp_input.c
|
||||
@@ -736,7 +736,7 @@ static void MoveUnackToUnrecvByPackInfo(struct FillpPcb *pcb, FILLP_UINT32 ackSe
|
||||
}
|
||||
}
|
||||
|
||||
-static void FillpPackInputLog(FILLP_CONST struct FillpPcb *pcb)
|
||||
+__attribute__((unused)) static void FillpPackInputLog(FILLP_CONST struct FillpPcb *pcb)
|
||||
{
|
||||
FILLP_LOGDBG("fillp_sock_id:%d nackSend:%u,nackFailed:%u,nackRcv:%u,packSend:%u,packFailed:%u,packRcv:%u",
|
||||
FILLP_GET_SOCKET(pcb)->index, pcb->statistics.debugPcb.nackSend, pcb->statistics.debugPcb.nackFailed,
|
||||
diff --git a/components/nstackx/nstackx_ctrl/core/coap_discover/coap_app.c b/components/nstackx/nstackx_ctrl/core/coap_discover/coap_app.c
|
||||
index 3496a1b..ea0a21a 100644
|
||||
--- a/components/nstackx/nstackx_ctrl/core/coap_discover/coap_app.c
|
||||
+++ b/components/nstackx/nstackx_ctrl/core/coap_discover/coap_app.c
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
#ifdef DFINDER_SUPPORT_MULTI_NIF
|
||||
static CoapCtxType g_coapCtxArr[NSTACKX_MAX_LISTENED_NIF_NUM] = {
|
||||
- {NULL, {0}, 0, NSTACKX_FALSE},
|
||||
- {NULL, {0}, 0, NSTACKX_FALSE}
|
||||
+ {NULL, {{0}}, 0, NSTACKX_FALSE},
|
||||
+ {NULL, {{0}}, 0, NSTACKX_FALSE}
|
||||
};
|
||||
#else
|
||||
static coap_context_t *g_ctx = NULL;
|
||||
diff --git a/core/common/dfx/hisysevent_adapter/softbus_hisysevt_nstack.c b/core/common/dfx/hisysevent_adapter/softbus_hisysevt_nstack.c
|
||||
index 07f88c2..cffb774 100644
|
||||
--- a/core/common/dfx/hisysevent_adapter/softbus_hisysevt_nstack.c
|
||||
+++ b/core/common/dfx/hisysevent_adapter/softbus_hisysevt_nstack.c
|
||||
@@ -110,7 +110,7 @@ static int CopyEventParamVal(SoftBusEvtParamType type, void *dst, const void *sr
|
||||
|
||||
static int NstackEventParaToSoftBusEventPara(SoftBusEvtParam *dst, const NstackDfxEvtParam *src)
|
||||
{
|
||||
- if (src->type >= SOFTBUS_EVT_PARAMTYPE_BUTT) {
|
||||
+ if (src->type >= (int)SOFTBUS_EVT_PARAMTYPE_BUTT) {
|
||||
LOG_ERR("softbus paramType max %d, nstack paramType %d",
|
||||
SOFTBUS_EVT_PARAMTYPE_BUTT, src->type);
|
||||
return SOFTBUS_ERR;
|
||||
@@ -133,7 +133,7 @@ static int NstackDfxEvtToSoftBusReportMsg(SoftBusEvtReportMsg *msg, const Nstack
|
||||
LOG_ERR("eventName mismatch, nstack event name %s", info->eventName);
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
- if (info->type >= SOFTBUS_EVT_TYPE_BUTT) {
|
||||
+ if (info->type >= (int)SOFTBUS_EVT_TYPE_BUTT) {
|
||||
LOG_ERR("eventType mismatch, nstack event type %d", info->type);
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
|
||||
index 10fbe2f..7d1c5e9 100644
|
||||
--- a/sdk/BUILD.gn
|
||||
+++ b/sdk/BUILD.gn
|
||||
@@ -98,4 +98,5 @@ target(build_type, "softbus_client") {
|
||||
part_name = "dsoftbus"
|
||||
subsystem_name = "communication"
|
||||
}
|
||||
+ cflags += [ "-Wno-unknown-pragmas" ]
|
||||
}
|
||||
diff --git a/sdk/transmission/trans_channel/proxy/src/client_trans_proxy_file_manager.c b/sdk/transmission/trans_channel/proxy/src/client_trans_proxy_file_manager.c
|
||||
index 6f63a66..b42b4ce 100644
|
||||
--- a/sdk/transmission/trans_channel/proxy/src/client_trans_proxy_file_manager.c
|
||||
+++ b/sdk/transmission/trans_channel/proxy/src/client_trans_proxy_file_manager.c
|
||||
@@ -1394,7 +1394,8 @@ static int32_t PutToRecvFileList(FileRecipientInfo *recipient, const SingleFileI
|
||||
SoftBusCloseFile(fd);
|
||||
return SOFTBUS_FILE_ERR;
|
||||
}
|
||||
- (void)ftruncate(fd, 0);
|
||||
+ int ret = ftruncate(fd, 0);
|
||||
+ (void)ret;
|
||||
recipient->recvFileInfo.fileStatus = NODE_BUSY;
|
||||
recipient->recvFileInfo.fileOffset = 0;
|
||||
recipient->recvFileInfo.timeOut = 0;
|
||||
--
|
||||
2.20.1 (Apple Git-117)
|
||||
|
||||
24
0007-feat-for-embedded-fix-sqlite-stringop-warning.patch
Normal file
24
0007-feat-for-embedded-fix-sqlite-stringop-warning.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 04af936af6889ac13426100f0d0bba5c59bd8687 Mon Sep 17 00:00:00 2001
|
||||
From: s_c_c <shichuchao@huawei.com>
|
||||
Date: Fri, 22 Mar 2024 11:26:29 +0800
|
||||
Subject: [PATCH] feat for embedded fix sqlite stringop warning
|
||||
|
||||
---
|
||||
BUILD.gn | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index af76d78..4c0f65b 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -80,6 +80,7 @@ ohos_shared_library("sqlite") {
|
||||
cflags_c = [
|
||||
"-fvisibility=hidden",
|
||||
"-Wno-implicit-fallthrough",
|
||||
+ "-Wno-error=stringop-overflow",
|
||||
]
|
||||
ldflags = [ "-Wl,--exclude-libs,ALL" ]
|
||||
deps = [ "//third_party/openssl:libcrypto_shared" ]
|
||||
--
|
||||
2.20.1 (Apple Git-117)
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
Name: communication_ipc
|
||||
Version: 1.0.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Inter-process communication (IPC) and Remote Procedure Call (RPC)
|
||||
License: Apache-2.0 and GPL-2.0
|
||||
URL: https://gitee.com/openharmony/communication_ipc
|
||||
@ -38,6 +38,9 @@ Patch1: 0001-remove-dependence-on-access-token-and-hitrace.patch
|
||||
Patch2: 0002-fix-build-error-from-header-include.patch
|
||||
Patch3: 0003-Adapt-binder-as-a-kernel-module-on-kernel-6.6.0-10.patch
|
||||
Patch4: 0004-adapt-compilation-for-softbus_client.patch
|
||||
Patch5: 0005-feat-for-embedded-fix-ipc-compile-error.patch
|
||||
Patch6: 0006-feat-for-embedded-fix-dsoftbus-compile-errors.patch
|
||||
Patch7: 0007-feat-for-embedded-fix-sqlite-stringop-warning.patch
|
||||
|
||||
BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks
|
||||
BuildRequires: commonlibrary_c_utils
|
||||
@ -68,13 +71,16 @@ cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}
|
||||
mv %{communication_path}/%{name} %{communication_path}/ipc
|
||||
%patch -P1 -p1 -d %{communication_path}/ipc
|
||||
%patch -P2 -p1 -d %{communication_path}/ipc
|
||||
%patch -P5 -p1 -d %{communication_path}/ipc
|
||||
|
||||
%setup -q -D -T -a 2 -c -n %{communication_path}
|
||||
mv %{communication_path}/communication_dsoftbus-%{oh_version} %{communication_path}/dsoftbus
|
||||
%patch -P4 -p1 -d %{communication_path}/dsoftbus
|
||||
%patch -P6 -p1 -d %{communication_path}/dsoftbus
|
||||
|
||||
%setup -q -D -T -a 3 -c -n %{third_party_path}
|
||||
mv %{third_party_path}/third_party_sqlite-%{oh_version} %{third_party_path}/sqlite
|
||||
%patch -P7 -p1 -d %{third_party_path}/sqlite
|
||||
|
||||
%setup -q -D -T -a 4 -c -n %{third_party_path}
|
||||
mv %{third_party_path}/third_party_libcoap-%{oh_version} %{third_party_path}/libcoap
|
||||
@ -224,6 +230,9 @@ insmod /%{ashmem_dest_path}/*.ko
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Mar 22 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-4
|
||||
- Fix ipc and dsoftbus compile errors for embedded
|
||||
|
||||
* Wed Dec 20 2023 Peng He <hepeng68@huawei.com> - 1.0.0-3
|
||||
- correct default ethernet interface from enp7s0 to eth0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user