fix win32 compile

This commit is contained in:
Doug MacEachern 2006-03-03 02:31:21 +00:00
parent 7250cfe937
commit e389b157f1
1 changed files with 6 additions and 5 deletions

View File

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