diff --git a/src/windows/native/java/net/NetworkInterface.h b/src/windows/native/java/net/NetworkInterface.h index 74c9c13c25cf35d08bc6df9612b3cdbd183e8a8c..c75892c530315e158ffef124df4878481a64be56 100644 --- a/src/windows/native/java/net/NetworkInterface.h +++ b/src/windows/native/java/net/NetworkInterface.h @@ -26,6 +26,7 @@ #ifndef NETWORK_INTERFACE_H #define NETWORK_INTERFACE_H +#include #include "net_util.h" /* @@ -86,6 +87,12 @@ extern jfieldID ni_ibaddressID; /* InterfaceAddress.address */ extern jfieldID ni_ibbroadcastID; /* InterfaceAddress.broadcast */ extern jfieldID ni_ibmaskID; /* InterfaceAddress.maskLength */ +/* We have included iphlpapi.h which includes iptypes.h which has the definition + * for MAX_ADAPTER_DESCRIPTION_LENGTH (along with the other definitions in this + * ifndef block). Therefore if MAX_ADAPTER_DESCRIPTION_LENGTH is defined we can + * be sure that the other definitions are also defined */ +#ifndef MAX_ADAPTER_DESCRIPTION_LENGTH + /* * Following includes come from iptypes.h */ @@ -372,6 +379,7 @@ typedef struct { UINT EnableProxy; UINT EnableDns; } FIXED_INFO, *PFIXED_INFO; +#endif /*!MAX_ADAPTER_DESCRIPTION_LENGTH*/ #ifndef IP_INTERFACE_NAME_INFO_DEFINED #define IP_INTERFACE_NAME_INFO_DEFINED