Commit fa02762b authored by Andrew MacDonald's avatar Andrew MacDonald Committed by Facebook GitHub Bot

In SafeAssert.cpp define fsync when unavailable

Summary: Posix does not require fsync to be provided, so define it as a local empty function when is it is not available

Reviewed By: yfeldblum

Differential Revision: D27243532

fbshipit-source-id: e7a9c31312e288458a9dc11736b238a378671caf
parent 8d3533ba
......@@ -498,6 +498,14 @@ constexpr int stderr_fileno = STDERR_FILENO;
#endif
#if !defined(_WIN32) && !defined(_POSIX_FSYNC)
int fsync(int fh) {
return 0;
}
#endif
void writeStderr(const char* s, size_t len) {
fileutil_detail::wrapFull(write, stderr_fileno, const_cast<char*>(s), len);
}
......
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