aboutsummaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index fe91d24..b48cedd 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4801,7 +4801,8 @@ PUGI_IMPL_NS_BEGIN
// anything that's not a regular file doesn't have a coherent length
if (!S_ISREG(st.st_mode)) return status_io_error;
- typedef off_t length_type;
+ // normally st_size is off_t, but Android NDK defines off_t as long (which is 32-bit when targeting x86 on Android) and st_size as long long
+ typedef long long length_type;
length_type length = st.st_size;
#elif defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
// there are 64-bit versions of fseek/ftell, let's use them