summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-10-18 18:14:17 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-21 23:56:18 +0200
commitd4a6abc1b18d65a2bd665cdda10cedd97a98c249 (patch)
tree1809712a95418c814a615d647f6f2b8211c912dc /Source/WebCore/platform
parent2761751ecaf61064c3742c639a37f110120e8292 (diff)
Fix build for boot2qt eAndroid
Reverts the removal of Android support in WTF, and brings the support up to date. Merged change to MacroAssemblerARM.cpp from QtScript. Replaces use of statvfs with statfs in one place. Replaces shm-based shared memory with ashmem-based in WebKit2. Change-Id: I440b1fbd94bb4148f7ba764d77de65230d13ed90 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/qt/FileSystemQt.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebCore/platform/qt/FileSystemQt.cpp b/Source/WebCore/platform/qt/FileSystemQt.cpp
index 16f4d7420..b5d0096e7 100644
--- a/Source/WebCore/platform/qt/FileSystemQt.cpp
+++ b/Source/WebCore/platform/qt/FileSystemQt.cpp
@@ -42,7 +42,9 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
-#if !defined(Q_OS_WIN)
+#if OS(ANDROID)
+#include <sys/vfs.h>
+#elif !defined(Q_OS_WIN)
#include <sys/statvfs.h>
#endif
@@ -215,9 +217,15 @@ uint64_t getVolumeFreeSizeForPath(const char* path)
return 0;
return static_cast<uint64_t>(freeBytesToCaller.QuadPart);
#else
+#if OS(ANDROID)
+ struct statfs volumeInfo;
+ if (statfs(path, &volumeInfo))
+ return 0;
+#else
struct statvfs volumeInfo;
if (statvfs(path, &volumeInfo))
return 0;
+#endif
return static_cast<uint64_t>(volumeInfo.f_bavail) * static_cast<uint64_t>(volumeInfo.f_frsize);
#endif