Boost C++ Libraries: Ticket #11733: Missing unistd.h include in boost/libs/filesystem/src/unique_path.cpp https://svn.boost.org/trac10/ticket/11733 <p> <code>uname -a</code>:<br /> Linux &lt;hostname&gt; 4.2.0-1-amd64 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1" title="#1: Bugs: boost.build causes ftjam to segfault (closed: Wont Fix)">#1</a> SMP Debian 4.2.1-2 (2015-09-27) x86_64 GNU/Linux </p> <p> <code>clang --version</code>:<br /> Debian clang version 3.7.0-2 (tags/RELEASE_370/final) (based on LLVM 3.7.0)<br /> Target: x86_64-pc-linux-gnu<br /> Thread model: posix </p> <p> libc++ version:<br /> #define _LIBCPP_VERSION 1101 </p> <p> Compiling:<br /> clang++ -D_GNU_SOURCE -fno-omit-frame-pointer -Drestrict=<span class="underline">restrict</span> -pthread -O2 -g -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Werror -Wformat-security -Woverloaded-virtual -Wwrite-strings -Wnon-virtual-dtor -Wno-mismatched-tags -Wno-tautological-constant-out-of-range-compare -Wno-gnu-designator -Wno-enum-conversion -Wno-unused-const-variable -fPIC -D<span class="underline">STDC_LIMIT_MACROS -std=gnu++11 -Wno-deprecated-declarations -stdlib=libc++ -c -o boost/libs/filesystem/src/_build/unique_path.o boost/libs/filesystem/src/unique_path.cpp </span></p> <p> Error messages: </p> <p> boost/libs/filesystem/src/unique_path.cpp:67:17: error: use of undeclared identifier 'read' </p> <blockquote> <p> ssize_t n = read(file, buf, len - bytes_read); </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> boost/libs/filesystem/src/unique_path.cpp:70:7: error: use of undeclared identifier 'close' </p> <blockquote> <p> close(file); <sup> </sup></p> </blockquote> <p> boost/libs/filesystem/src/unique_path.cpp:78:3: error: use of undeclared identifier 'close' </p> <blockquote> <p> close(file); <sup> </sup></p> </blockquote> <p> 3 errors generated. </p> <p> Fix:<br /> Include &lt;unistd.h&gt; if BOOST_POSIX_API and BOOST_HAS_UNISTD_H are defined. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11733 Trac 1.4.3 Idar Tollefsen <idart@…> Thu, 15 Oct 2015 11:32:23 GMT attachment set https://svn.boost.org/trac10/ticket/11733 https://svn.boost.org/trac10/ticket/11733 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">0001-boost-Adds-missing-include-for-file-operations.patch</span> </li> </ul> Ticket Beman Dawes Fri, 16 Oct 2015 19:54:32 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/11733#comment:1 https://svn.boost.org/trac10/ticket/11733#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.60.0</span> </li> </ul> <p> Patch applied to develop branch. Will be merged to master after sufficient tests have cycled. </p> <p> Thanks, </p> <p> --Beman </p> Ticket