pkgsrc-wip/chromium/patches/patch-base_test_test__file__util__linux.cc
Rui-Xiang Guo fa06d0f9e3 Update chromium to 10.0.648.205 that is based on the OpenBSD's ports with
modifying for *BSD support and additional NetBSD specific patches.
This version includes some security bug fixes.
2011-04-28 03:09:01 +00:00

20 lines
612 B
C++

$NetBSD: patch-base_test_test__file__util__linux.cc,v 1.1 2011/04/28 03:09:02 rxg Exp $
--- base/test/test_file_util_linux.cc.orig 2011-04-13 08:01:34.000000000 +0000
+++ base/test/test_file_util_linux.cc
@@ -16,10 +16,15 @@ bool EvictFileFromSystemCache(const File
int fd = open(file.value().c_str(), O_RDONLY);
if (fd < 0)
return false;
+#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
+ if (fsync(fd) != 0)
+ return false;
+#else
if (fdatasync(fd) != 0)
return false;
if (posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED) != 0)
return false;
+#endif
close(fd);
return true;
}