Commit 5aa79b72 authored by Milo Yip's avatar Milo Yip Committed by GitHub

Merge pull request #1105 from clach04/issue_1104_solaris_fread

Fix issue #1104 Solaris compilation errors fread()/fwrite()
parents 75a71441 1be14d04
......@@ -68,7 +68,7 @@ private:
++current_;
else if (!eof_) {
count_ += readCount_;
readCount_ = fread(buffer_, 1, bufferSize_, fp_);
readCount_ = std::fread(buffer_, 1, bufferSize_, fp_);
bufferLast_ = buffer_ + readCount_ - 1;
current_ = buffer_;
......
......@@ -62,7 +62,7 @@ public:
void Flush() {
if (current_ != buffer_) {
size_t result = fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
size_t result = std::fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
if (result < static_cast<size_t>(current_ - buffer_)) {
// failure deliberately ignored at this time
// added to avoid warn_unused_result build errors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment