Changeset View
Changeset View
Standalone View
Standalone View
databases/arangodb33/files/patch-lib_Basics_process-utils.cpp
--- lib/Basics/process-utils.cpp.orig 2017-11-15 11:23:07 UTC | --- lib/Basics/process-utils.cpp.orig 2018-01-05 13:56:52 UTC | ||||
+++ lib/Basics/process-utils.cpp | +++ lib/Basics/process-utils.cpp | ||||
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||||
#include "process-utils.h" | #include "process-utils.h" | ||||
-#if defined(TRI_HAVE_MACOS_MEM_STATS) | -#if defined(TRI_HAVE_MACOS_MEM_STATS) | ||||
+#if defined(TRI_HAVE_MACOS_MEM_STATS) || defined (__FreeBSD__) | +#if defined(TRI_HAVE_MACOS_MEM_STATS) || defined(__FreeBSD__) | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#endif | #endif | ||||
@@ -581,6 +581,7 @@ TRI_process_info_t TRI_ProcessInfoSelf() | @@ -557,6 +557,7 @@ ProcessInfo TRI_ProcessInfoSelf() { | ||||
} | } | ||||
#else | #else | ||||
+#ifdef _WIN32 | +#ifdef _WIN32 | ||||
/// -------------------------------------------- | /// -------------------------------------------- | ||||
/// transform a file time to timestamp | /// transform a file time to timestamp | ||||
/// Particularities: | /// Particularities: | ||||
@@ -673,6 +674,7 @@ TRI_process_info_t TRI_ProcessInfoSelf() | @@ -648,6 +649,7 @@ ProcessInfo TRI_ProcessInfoSelf() { | ||||
return result; | return result; | ||||
} | } | ||||
#endif | #endif | ||||
+#endif | +#endif | ||||
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// | ||||
/// @brief returns information about the process | /// @brief returns information about the process | ||||
@@ -1254,7 +1256,7 @@ bool TRI_ContinueExternalProcess(TRI_ext | @@ -1435,7 +1437,7 @@ bool TRI_ContinueExternalProcess(Externa | ||||
/// @brief gets the physical memory | /// @brief gets the physical memory | ||||
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// | ||||
-#if defined(TRI_HAVE_MACOS_MEM_STATS) | -#if defined(TRI_HAVE_MACOS_MEM_STATS) | ||||
+#if defined(TRI_HAVE_MACOS_MEM_STATS) || defined(__FreeBSD__) | +#if defined(TRI_HAVE_MACOS_MEM_STATS) || defined(__FreeBSD__) | ||||
static uint64_t GetPhysicalMemory() { | static uint64_t GetPhysicalMemory() { | ||||
int mib[2]; | int mib[2]; | ||||
@@ -1297,6 +1299,7 @@ static uint64_t GetPhysicalMemory() { | |||||
#else | |||||
+#ifdef _WIN32 | |||||
static uint64_t GetPhysicalMemory() { | |||||
PROCESS_MEMORY_COUNTERS pmc; | |||||
memset(&result, 0, sizeof(result)); | |||||
@@ -1307,6 +1310,7 @@ static uint64_t GetPhysicalMemory() { | |||||
} | |||||
return 0; | |||||
} | |||||
+#endif // _WIN32 | |||||
#endif | |||||
#endif | |||||
#endif |