diff options
author | David Monahan <david.monahan@arm.com> | 2020-01-24 09:13:33 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2020-01-24 16:06:41 +0000 |
commit | a0d189697bb549a37886790536be7e6879ee943a (patch) | |
tree | 477e05fcc4b91852fd8511e38a3d932a09d24975 /src/armnnUtils/Filesystem.cpp | |
parent | e61f0712dc480f70372fcfe0921a85a7de53661b (diff) | |
download | armnn-a0d189697bb549a37886790536be7e6879ee943a.tar.gz |
Updates to Filesystem.cpp/hpp and NetworkSockets.cpp/hpp to fix failing master
Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I566c29754aa586167a938d2c2b4e5069a39b5e50
Diffstat (limited to 'src/armnnUtils/Filesystem.cpp')
-rw-r--r-- | src/armnnUtils/Filesystem.cpp | 11 |
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) |