Fix 64-bit build.
A warning about signed vs unsigned comparison was converted
into an error here :
...
struct stat st;
if (st.st_size > sizeof(prop_area) {
...
st_size is either an off64_t, which is a signed type. It's
worth investigating why this didn't trigger a warning on 32 bit,
where it's signed as well.
Change-Id: Ib2622bd5c444ddcfa7fb2141f00332cbb4a0818b
diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp
index 7c2f8dc..56f3724 100644
--- a/libc/bionic/system_properties.cpp
+++ b/libc/bionic/system_properties.cpp
@@ -238,7 +238,7 @@
if ((fd_stat.st_uid != 0)
|| (fd_stat.st_gid != 0)
|| ((fd_stat.st_mode & (S_IWGRP | S_IWOTH)) != 0)
- || (fd_stat.st_size < sizeof(prop_area)) ) {
+ || (fd_stat.st_size < static_cast<off_t>(sizeof(prop_area))) ) {
return -1;
}