Index: src/ports/SkOSFile_stdio.cpp |
diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp |
index 3371bb7031b7b1c871560a564139a4ad54dc5e3e..ecd5a027fcd82618d371b136c43e7b4f200f02bb 100644 |
--- a/src/ports/SkOSFile_stdio.cpp |
+++ b/src/ports/SkOSFile_stdio.cpp |
@@ -143,6 +143,14 @@ void sk_fflush(FILE* f) { |
::fflush(f); |
} |
+void sk_fsync(FILE* f) { |
+#if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) \ |
+ && !defined(_NEWLIB_VERSION) |
+ int fd = ::fileno(f); |
+ ::fsync(fd); |
+#endif |
+} |
+ |
bool sk_fseek(FILE* f, size_t byteCount) { |
int err = ::fseek(f, (long)byteCount, SEEK_SET); |
return err == 0; |