Cast sysinfo.uptime for musl
Upstream musl libc defines sysinfo.uptime as unsigned long, while the
kernel and glibc define it as long. Cast it to long for the
comparision.
Bug: 190084016
Test: bionic-unit-tests-glibc
Change-Id: Ib322472d512a9a7474a936e33f35523e1dc995d9
diff --git a/tests/sys_sysinfo_test.cpp b/tests/sys_sysinfo_test.cpp
index cca2f44..69656ad 100644
--- a/tests/sys_sysinfo_test.cpp
+++ b/tests/sys_sysinfo_test.cpp
@@ -43,7 +43,7 @@
memset(&si, 0, sizeof(si));
ASSERT_EQ(0, sysinfo(&si));
- ASSERT_GT(si.uptime, 10); // You're not running CTS within 10s of booting!
+ ASSERT_GT(static_cast<long>(si.uptime), 10); // You're not running CTS within 10s of booting!
ASSERT_GT(uint64_t(si.totalram) * si.mem_unit, uint64_t(512 * 1024 * 1024));
ASSERT_GE(si.totalram, si.freeram);
ASSERT_GE(si.totalswap, si.freeswap);