Subject: [Boost-bugs] [Boost C++ Libraries] #11733: Missing unistd.h include in boost/libs/filesystem/src/unique_path.cpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-15 11:31:39
#11733: Missing unistd.h include in boost/libs/filesystem/src/unique_path.cpp
--------------------------------------+------------------------
Reporter: Idar Tollefsen <idart@â¦> | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
--------------------------------------+------------------------
`uname -a`:[[BR]]
Linux <hostname> 4.2.0-1-amd64 #1 SMP Debian 4.2.1-2 (2015-09-27) x86_64
GNU/Linux
`clang --version`:[[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
libc++ version:[[BR]]
#define _LIBCPP_VERSION 1101
Compiling:[[BR]]
clang++ -D_GNU_SOURCE -fno-omit-frame-pointer -Drestrict=__restrict__
-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__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
Error messages:
boost/libs/filesystem/src/unique_path.cpp:67:17: error: use of undeclared
identifier 'read'
ssize_t n = read(file, buf, len - bytes_read);
^
boost/libs/filesystem/src/unique_path.cpp:70:7: error: use of undeclared
identifier 'close'
close(file);
^
boost/libs/filesystem/src/unique_path.cpp:78:3: error: use of undeclared
identifier 'close'
close(file);
^
3 errors generated.
Fix:[[BR]]
Include <unistd.h> if BOOST_POSIX_API and BOOST_HAS_UNISTD_H are defined.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11733> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC