修复arkui-x编译失败call to 'ioctl' is ambiguous

Signed-off-by: guochao <guochao76@huawei.com>
This commit is contained in:
guochao 2024-08-11 18:46:59 +08:00
parent 73431baae0
commit 873d8ad9aa
3 changed files with 6 additions and 1 deletions

View File

@ -181,7 +181,11 @@ int SqliteUtils::GetFileSize(const std::string &fileName)
void SqliteUtils::ControlDeleteFlag(const std::string fileName, FlagControlType flagControlType)
{
int fd = open(fileName.c_str(), O_RDONLY, 0777);
int fd = open(fileName.c_str(), O_RDONLY, S_IRWXU | S_IRWXG);
if (fd < 0) {
LOG_ERROR("Open failed, errno=%{public}d.", errno);
return;
}
unsigned int flags = 0;
int ret = ioctl(fd, HMFS_IOCTL_HW_GET_FLAGS, &flags);
if (ret < 0) {

View File

@ -242,6 +242,7 @@ if (is_ohos && !build_ohos_sdk) {
include_dirs = [
"${relational_store_mock_path}/frameworks/native/rdb",
"${relational_store_mock_path}/frameworks/native/win32",
"mock/include",
"${relational_store_common_path}/include",
"${relational_store_native_path}/rdb/mock/include",