Boost C++ Libraries: Ticket #13172: filesystem::directory_iterator::operator++: Function not implemented (errno not reset) https://svn.boost.org/trac10/ticket/13172 <p> In <code>boost/libs/filesystem/src/operations.cpp</code> we have <code>readdir_r_simulator</code>, which throws </p> <blockquote class="citation"> <p> exception of type boost::filesystem::filesystem_error: boost::filesystem::directory_iterator::operator++: Function not implemented: "/data/local/tmp/my_existing_path" </p> </blockquote> <p> This is because <code>errno</code> is not reset after the <code>::sysconf(_SC_THREAD_SAFE_FUNCTIONS)</code> call, which sets errno to 38 = ENOSYS. </p> <p> A patch is to add the line errno = 0; after <code>::sysconf(_SC_THREAD_SAFE_FUNCTIONS)</code>. </p> <p> This affects Android, e.g. <a class="ext-link" href="https://github.com/android-ndk/ndk/issues/457"><span class="icon">​</span>https://github.com/android-ndk/ndk/issues/457</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13172 Trac 1.4.3 Simon Warta <simon@…> Mon, 21 Aug 2017 18:35:05 GMT <link>https://svn.boost.org/trac10/ticket/13172#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13172#comment:1</guid> <description> <p> The diff of the fix is here: <a class="ext-link" href="https://gist.github.com/webmaster128/5912a70d100e9ef341df67b177c465d6"><span class="icon">​</span>https://gist.github.com/webmaster128/5912a70d100e9ef341df67b177c465d6</a> </p> </description> <category>Ticket</category> </item> <item> <author>thomas@…</author> <pubDate>Thu, 16 Nov 2017 16:00:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13172#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13172#comment:2</guid> <description> <p> i can confirm this also affects android ndk <a class="changeset" href="https://svn.boost.org/trac10/changeset/16" title="*** empty log message *** ">r16</a> when using clang w/ libc++ </p> <p> the mentioned fix solves it ;) thanks! </p> </description> <category>Ticket</category> </item> </channel> </rss>