$OpenBSD: patch-tools_gn_base_files_file_posix_cc,v 1.2 2019/04/17 11:48:55 robert Exp $

Index: tools/gn/base/files/file_posix.cc
--- tools/gn/base/files/file_posix.cc.orig
+++ tools/gn/base/files/file_posix.cc
@@ -414,7 +414,7 @@ void File::DoInitialize(const FilePath& path, uint32_t
 bool File::Flush() {
   DCHECK(IsValid());
 
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   return !HANDLE_EINTR(fdatasync(file_.get()));
 #else
   return !HANDLE_EINTR(fsync(file_.get()));
