summaryrefslogtreecommitdiff
path: root/boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch
diff options
context:
space:
mode:
Diffstat (limited to 'boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch')
-rw-r--r--boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch b/boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch
new file mode 100644
index 0000000..f722b15
--- /dev/null
+++ b/boost-1.78-filesystem-Use-O_NONBLOCK-instead-of-O_NDELAY.patch
@@ -0,0 +1,23 @@
+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;
+