diff --git a/modules/common/appspawn_adapter.cpp b/modules/common/appspawn_adapter.cpp index 7f4d03951c983e9e7976a584b9ed8bce2eea0aae..e665d940d52115c3ddde6eddb7c12be066a7d160 100644 --- a/modules/common/appspawn_adapter.cpp +++ b/modules/common/appspawn_adapter.cpp @@ -65,9 +65,9 @@ int SetAppAccessToken(const AppSpawnMgr *content, const AppSpawningCtx *property return 0; } +#if defined(WITH_SELINUX) && !defined(APPSPAWN_TEST) int SetSelinuxConNweb(const AppSpawnMgr *content, const AppSpawningCtx *property) { -#if defined(WITH_SELINUX) && !defined(APPSPAWN_TEST) uint32_t len = 0; std::string processType = reinterpret_cast(GetAppPropertyExt(property, MSG_EXT_NAME_PROCESS_TYPE, &len)); @@ -78,9 +78,10 @@ int SetSelinuxConNweb(const AppSpawnMgr *content, const AppSpawningCtx *property ret = setcon("u:r:isolated_gpu:s0"); } APPSPAWN_CHECK_ONLY_LOG(ret == 0, "Setcon failed, errno: %{public}d", errno); -#endif + return 0; } +#endif #ifdef WITH_SELINUX void SetHapDomainInfo(HapDomainInfo *hapDomainInfo, const AppSpawningCtx *property,