Skip to content

Instantly share code, notes, and snippets.

@webmaster128
Last active August 24, 2018 08:10
Show Gist options
  • Save webmaster128/5912a70d100e9ef341df67b177c465d6 to your computer and use it in GitHub Desktop.
Save webmaster128/5912a70d100e9ef341df67b177c465d6 to your computer and use it in GitHub Desktop.
diff --git a/boost/libs/filesystem/src/operations.cpp b/boost/libs/filesystem/src/operations.cpp
index 4114e02a..e663fabc 100644
--- a/boost/libs/filesystem/src/operations.cpp
+++ b/boost/libs/filesystem/src/operations.cpp
@@ -2169,8 +2169,6 @@ namespace
inline int readdir_r_simulator(DIR * dirp, struct dirent * entry,
struct dirent ** result)// *result set to 0 on end of directory
{
- errno = 0;
-
# if !defined(__CYGWIN__)\
&& defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
&& defined(_SC_THREAD_SAFE_FUNCTIONS)\
@@ -2183,6 +2181,7 @@ namespace
struct dirent * p;
*result = 0;
+ errno = 0;
if ((p = ::readdir(dirp))== 0)
return errno;
std::strcpy(entry->d_name, p->d_name);
@fake666
Copy link

fake666 commented Aug 24, 2018

seems this has been fixed in boost 1.68.0? without applying this patch though, and i can't seem to comment on the trac ticket https://svn.boost.org/trac10/ticket/13172 anymore o_O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment