aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils/Filesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnUtils/Filesystem.cpp')
-rw-r--r--src/armnnUtils/Filesystem.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/armnnUtils/Filesystem.cpp b/src/armnnUtils/Filesystem.cpp
index 08c447b3f6..6c8175b202 100644
--- a/src/armnnUtils/Filesystem.cpp
+++ b/src/armnnUtils/Filesystem.cpp
@@ -18,15 +18,22 @@ namespace armnnUtils
namespace Filesystem
{
-long GetFileSize(const char* path)
+long long GetFileSize(const char* path)
{
-#if defined(__unix__)
+#if defined(__ANDROID__)
struct stat statusBuffer;
if (stat(path, & statusBuffer) != 0)
{
return -1;
}
return statusBuffer.st_size;
+#elif defined(__unix__)
+ struct stat statusBuffer;
+ if (stat(path, & statusBuffer) != 0)
+ {
+ return -1;
+ }
+ return static_cast<long long>(statusBuffer.st_size);
#elif defined(_MSC_VER)
WIN32_FILE_ATTRIBUTE_DATA attr;
if (::GetFileAttributesEx(path, GetFileExInfoStandard, &attr) == 0)