Opened 7 years ago
Closed 7 years ago
#11733 closed Bugs (fixed)
Missing unistd.h include in boost/libs/filesystem/src/unique_path.cpp
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | filesystem |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
uname -a
:
Linux <hostname> 4.2.0-1-amd64 #1 SMP Debian 4.2.1-2 (2015-09-27) x86_64 GNU/Linux
clang --version
:
Debian clang version 3.7.0-2 (tags/RELEASE_370/final) (based on LLVM 3.7.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
libc++ version:
#define _LIBCPP_VERSION 1101
Compiling:
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 -DSTDC_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:
Include <unistd.h> if BOOST_POSIX_API and BOOST_HAS_UNISTD_H are defined.
Attachments (1)
Change History (2)
by , 7 years ago
Attachment: | 0001-boost-Adds-missing-include-for-file-operations.patch added |
---|
comment:1 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Patch applied to develop branch. Will be merged to master after sufficient tests have cycled.
Thanks,
--Beman