diff --git a/src/os/win32/sigar_os.h b/src/os/win32/sigar_os.h index cd3c7e85..aad11ac7 100755 --- a/src/os/win32/sigar_os.h +++ b/src/os/win32/sigar_os.h @@ -19,9 +19,18 @@ #ifndef SIGAR_OS_H #define SIGAR_OS_H +#if !defined(MSVC) && defined(_MSC_VER) +#define MSVC +#endif + #ifdef MSVC +#define WIN32_LEAN_AND_MEAN +#define snprintf _snprintf #if _MSC_VER <= 1200 #define SIGAR_USING_MSC6 /* Visual Studio version 6 */ +#define HAVE_MIB_IPADDRROW_WTYPE 0 +#else +#define HAVE_MIB_IPADDRROW_WTYPE 1 #endif #else /* Cross compiling */ diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index f5b55644..2ed4ab74 100755 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -23,7 +23,9 @@ #include "sigar_util.h" #include "sigar_format.h" #include +#ifndef MSVC #include +#endif #define USING_WIDE_S(s) (s)->using_wide #define USING_WIDE() USING_WIDE_S(sigar)