diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-18 09:10:23 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-18 09:10:23 +0000 |
commit | 3eab9473bfce78770ddb6f7b37179a85061fe369 (patch) | |
tree | f3a38b77cdb45a7bfec40a8bbbfa76c7a2014766 | |
parent | 3a77185e1e69c9943a789264ba646d6da5f0d6ef (diff) | |
download | deluge-3eab9473bfce78770ddb6f7b37179a85061fe369.tar.gz deluge-3eab9473bfce78770ddb6f7b37179a85061fe369.tar.bz2 deluge-3eab9473bfce78770ddb6f7b37179a85061fe369.zip |
lt fix 1737
-rwxr-xr-x | libtorrent/src/file.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libtorrent/src/file.cpp b/libtorrent/src/file.cpp index 67024cf81..5e01e1ae5 100755 --- a/libtorrent/src/file.cpp +++ b/libtorrent/src/file.cpp @@ -68,6 +68,7 @@ BOOST_STATIC_ASSERT(sizeof(lseek(0, 0, 0)) >= 8); #include <boost/filesystem/operations.hpp> #include "libtorrent/file.hpp" #include <sstream> +#include <cstring> #ifndef O_BINARY #define O_BINARY 0 @@ -184,7 +185,7 @@ namespace libtorrent { std::stringstream msg; msg << "open failed: '" << path.native_file_string() << "'. " - << strerror(errno); + << std::strerror(errno); throw file_error(msg.str()); } m_open_mode = mode; @@ -216,7 +217,7 @@ namespace libtorrent if (ret == -1) { std::stringstream msg; - msg << "read failed: " << strerror(errno); + msg << "read failed: " << std::strerror(errno); throw file_error(msg.str()); } return ret; @@ -240,7 +241,7 @@ namespace libtorrent if (ret == -1) { std::stringstream msg; - msg << "write failed: " << strerror(errno); + msg << "write failed: " << std::strerror(errno); throw file_error(msg.str()); } return ret; @@ -254,7 +255,7 @@ namespace libtorrent if (ftruncate(m_fd, s) < 0) { std::stringstream msg; - msg << "ftruncate failed: '" << strerror(errno); + msg << "ftruncate failed: '" << std::strerror(errno); throw file_error(msg.str()); } #endif @@ -278,7 +279,7 @@ namespace libtorrent if (ret == -1) { std::stringstream msg; - msg << "seek failed: '" << strerror(errno) + msg << "seek failed: '" << std::strerror(errno) << "' fd: " << m_fd << " offset: " << offset << " seekdir: " << seekdir; |