# HG changeset patch # User chegar # Date 1216459654 -3600 # Node ID 17568a6179560073158c4db0d3b5e5eb37ef66d8 # Parent 8445a646acfb2261e9817d77b1151c5983168222 6726164: jdk\src\windows\native\java\net\NetworkInterface.h(172) : error C2365: 'IpPrefixOriginOther' : redef Summary: Change the NetworkInterface header that allows it to compile on the current compiler/SDK version as well as the SDK bundled with Visual Studio 2008. Reviewed-by: ohair, alanb diff -r 8445a646acfb -r 17568a617956 jdk/src/windows/native/java/net/NetworkInterface.h --- a/jdk/src/windows/native/java/net/NetworkInterface.h Mon Jul 14 11:39:42 2008 +0100 +++ b/jdk/src/windows/native/java/net/NetworkInterface.h Sat Jul 19 10:27:34 2008 +0100 @@ -26,6 +26,7 @@ #ifndef NETWORK_INTERFACE_H #define NETWORK_INTERFACE_H +#include #include "net_util.h" /* @@ -86,6 +87,12 @@ 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 @@ 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