diff --git a/interfaces/kits/js/src/mod_fs/common_func.cpp b/interfaces/kits/js/src/mod_fs/common_func.cpp index 0034d6a21da18ba559c3c328840bf4526de84ffe..6193013a3afc892ae12f1afa3babee85bd964689 100644 --- a/interfaces/kits/js/src/mod_fs/common_func.cpp +++ b/interfaces/kits/js/src/mod_fs/common_func.cpp @@ -34,7 +34,7 @@ #include "filemgmt_libhilog.h" #include "filemgmt_libn.h" #include "file_utils.h" -#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) +#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) #include "ipc_skeleton.h" #include "tokenid_kit.h" #endif @@ -349,7 +349,7 @@ string CommonFunc::Decode(const std::string &uri) return outPutStream.str(); } -#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) +#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) bool IsNumeric(const string &str) { if (str.empty()) { diff --git a/interfaces/kits/js/src/mod_fs/common_func.h b/interfaces/kits/js/src/mod_fs/common_func.h index b94235216c2f639c114f08fd6048076a5f686186..567cf26b4b167d3da00d1a439b8bfc469babbefa 100644 --- a/interfaces/kits/js/src/mod_fs/common_func.h +++ b/interfaces/kits/js/src/mod_fs/common_func.h @@ -19,7 +19,7 @@ #include "fd_guard.h" #include "n_val.h" #include "uv.h" -#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) +#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) #include "iremote_broker.h" #include "file_uri.h" #endif @@ -64,7 +64,7 @@ struct FileInfo { std::unique_ptr fdg = { nullptr }; }; -#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) +#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) class FileIoToken : public IRemoteBroker { public: DECLARE_INTERFACE_DESCRIPTOR(u"ohos.fileio.open"); @@ -102,7 +102,7 @@ struct CommonFunc { static std::string GetModeFromFlags(unsigned int flags); static bool CheckPublicDirPath(const std::string &sandboxPath); static std::string Decode(const std::string &uri); -#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) +#if !defined(WIN_PLATFORM) && !defined(IOS_PLATFORM) && !defined(CROSS_PLATFORM) static bool GetAndCheckUserId(Uri* uri, std::string &userId); static bool IsSystemApp(); #endif