Signed-off-by: Darryl L. Pierce <dpierce(a)redhat.com>
---
src/host.cpp | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/host.cpp b/src/host.cpp
index d6955a5..29dcc29 100644
--- a/src/host.cpp
+++ b/src/host.cpp
@@ -162,7 +162,6 @@ host_get_architecture()
if(architecture.empty())
{
-
#ifdef __linux__
struct utsname details;
@@ -170,8 +169,9 @@ host_get_architecture()
{
architecture = string(details.machine);
}
-#endif
+#elif defined WIN32
+#endif
}
return architecture;
@@ -184,15 +184,18 @@ host_get_memory()
if(!memory)
{
-
#ifdef __linux__
struct sysinfo sysinf;
if(!sysinfo(&sysinf))
{
memory = sysinf.totalram / 1024L;
}
-#endif
+#elif defined WIN32
+ MEMORYSTATUS status;
+ GlobalMemoryStatus(&status);
+ memory = status.dwTotalPhys / 1024L;
+#endif
}
return memory;
--
1.7.2