diff --git a/src/gc/unix/gcenv.unix.cpp b/src/gc/unix/gcenv.unix.cpp index e7da60747504..bd0c3fd599d4 100644 --- a/src/gc/unix/gcenv.unix.cpp +++ b/src/gc/unix/gcenv.unix.cpp @@ -42,6 +42,10 @@ #include #endif // HAVE_XSWDEV +#if HAVE_XSW_USAGE +#include +#endif // HAVE_XSW_USAGE + #ifdef __APPLE__ #include #include @@ -49,8 +53,12 @@ #include #endif // __APPLE__ -#if HAVE_SYSCTL +#if HAVE_SYSCONF +// already included above +#elif HAVE_SYSCTL #include +#else +#error "Don't know how to get total physical memory on this platform" #endif #ifdef __linux__ diff --git a/src/pal/src/misc/sysinfo.cpp b/src/pal/src/misc/sysinfo.cpp index 52e8ec065d73..e3574fa23a6c 100644 --- a/src/pal/src/misc/sysinfo.cpp +++ b/src/pal/src/misc/sysinfo.cpp @@ -28,12 +28,19 @@ Revision History: #define __STDC_FORMAT_MACROS #include #include -#if HAVE_SYSCTL + +#if HAVE_SYSCONF +// already included above +#elif HAVE_SYSCTL #include -#elif !HAVE_SYSCONF +#else #error Either sysctl or sysconf is required for GetSystemInfo. #endif +#if HAVE_SYSCTLBYNAME +#include +#endif + #if HAVE_SYSINFO #include #endif