diff --git a/src/os/win32/sigar_os.h b/src/os/win32/sigar_os.h index 91ce12aa..de626e53 100644 --- a/src/os/win32/sigar_os.h +++ b/src/os/win32/sigar_os.h @@ -19,6 +19,10 @@ #ifndef SIGAR_OS_H #define SIGAR_OS_H +#if _MSC_VER <= 1200 +#define SIGAR_USING_MSC6 /* Visual Studio version 6 */ +#endif + #define WIN32_LEAN_AND_MEAN #include #include @@ -144,7 +148,7 @@ typedef struct _WINSTATION_INFO { /* end wtsapi32.h */ -#if _MSC_VER <= 1200 +#ifdef SIGAR_USING_MSC6 /* from winbase.h not in vs6.0 */ typedef struct { diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index 88130493..4733d87d 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -2225,7 +2225,7 @@ static int sigar_get_netif_ipaddr(sigar_t *sigar, MIB_IPADDRROW *row = &mib->table[i]; short type; -#if _MSC_VER <= 1200 +#ifdef SIGAR_USING_MSC6 type = row->unused2; #else type = row->wType; @@ -3297,7 +3297,7 @@ int sigar_who_list_get_win32(sigar_t *sigar, #define VER_NT_WORKSTATION 0x0000001 #endif -#if _MSC_VER <= 1200 +#if SIGAR_USING_MSC6 #define sigar_wProductType wReserved[1] #else #define sigar_wProductType wProductType