From e389b157f14bf84bfe8415523e92447710fc55ac Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 3 Mar 2006 02:31:21 +0000 Subject: [PATCH] fix win32 compile --- include/sigar_private.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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