diff --git a/include/sigar_private.h b/include/sigar_private.h index 6a50dab6..ff35a794 100644 --- a/include/sigar_private.h +++ b/include/sigar_private.h @@ -239,20 +239,21 @@ int sigar_get_iftype(const char *name, int *type, int *inst); #define SIGAR_NIC_ETHERNET "Ethernet" #define SIGAR_NIC_NETROM "AMPR NET/ROM" -#ifdef WIN32 -#else +#ifndef WIN32 #include #endif -#define SIGAR_GETHOSTBYNAME_LEN 512 +#define SIGAR_HOSTENT_LEN 512 #if defined(__hpux) || defined(_AIX) #define SIGAR_HAS_HOSTENT_DATA #endif typedef struct { - char buffer[SIGAR_GETHOSTBYNAME_LEN]; - struct hostent hs; + char buffer[SIGAR_HOSTENT_LEN]; int error; +#ifndef WIN32 + struct hostent hs; +#endif #ifdef SIGAR_HAS_HOSTENT_DATA struct hostent_data hd; #endif