Bug 648735 - Define stat64 to stat on Open/FreeBSD, since they don't have stat64() but stat handles >2Gb files fine; r=cjones
authorLandry Breuil <landry@openbsd.org>
Tue, 20 Sep 2011 13:23:03 +0100
changeset 77193 f78d9f4f5234a05770aaa06e1b28280acf8c8aa5
parent 77192 ea33ddde6adee9d4f0e205eadafc130e5c52a375
child 77194 bb924724a032cd1457aec0dc9d9a7579e66a0aeb
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerscjones
bugs648735, 527621
milestone9.0a1
Bug 648735 - Define stat64 to stat on Open/FreeBSD, since they don't have stat64() but stat handles >2Gb files fine; r=cjones lifted from freebsd's www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc and https://bugzilla.mozilla.org/attachment.cgi?id=527621
ipc/chromium/src/base/file_util_posix.cc
--- a/ipc/chromium/src/base/file_util_posix.cc
+++ b/ipc/chromium/src/base/file_util_posix.cc
@@ -25,16 +25,21 @@
 
 #include "base/basictypes.h"
 #include "base/eintr_wrapper.h"
 #include "base/file_path.h"
 #include "base/logging.h"
 #include "base/string_util.h"
 #include "base/time.h"
 
+// FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine
+#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
+#define stat64 stat
+#endif
+
 namespace file_util {
 
 #if defined(GOOGLE_CHROME_BUILD)
 static const char* kTempFileName = "com.google.chrome.XXXXXX";
 #else
 static const char* kTempFileName = "org.chromium.XXXXXX";
 #endif