Ai
1 Star 0 Fork 40

hefq343/boost_1

forked from src-openEuler/boost
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
Liu Zixian 提交于 2022-03-20 01:09 +08:00 . filesystem: backport upstream security patches
From dbec3baaadf7d899e66aa90843d285e749e88b2d Mon Sep 17 00:00:00 2001
From: Andrey Semashev <andrey.semashev@gmail.com>
Date: Thu, 3 Feb 2022 20:58:42 +0300
Subject: [PATCH] Use O_NONBLOCK instead of O_NDELAY as it is the flag defined
by POSIX.
---
libs/filesystem/src/directory.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/filesystem/src/directory.cpp b/libs/filesystem/src/directory.cpp
index 8b41ae5e1..dd2f9413b 100644
--- a/libs/filesystem/src/directory.cpp
+++ b/libs/filesystem/src/directory.cpp
@@ -219,7 +219,7 @@ inline std::size_t path_max()
error_code dir_itr_first(void*& handle, void*& buffer, const char* dir, std::string& target, unsigned int opts, fs::file_status&, fs::file_status&)
{
#if defined(BOOST_FILESYSTEM_HAS_FDOPENDIR_NOFOLLOW)
- int flags = O_DIRECTORY | O_RDONLY | O_NDELAY | O_CLOEXEC;
+ int flags = O_DIRECTORY | O_RDONLY | O_NONBLOCK | O_CLOEXEC;
if ((opts & static_cast< unsigned int >(directory_options::_detail_no_follow)) != 0u)
flags |= O_NOFOLLOW;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hefq343/boost_1.git
git@gitee.com:hefq343/boost_1.git
hefq343
boost_1
boost_1
openEuler-22.03-LTS-SP4

搜索帮助