提交 538fefe7 编写于 作者: C chegar

6726164: jdk\src\windows\native\java\net\NetworkInterface.h(172) : error...

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
上级 3f253430
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#ifndef NETWORK_INTERFACE_H #ifndef NETWORK_INTERFACE_H
#define NETWORK_INTERFACE_H #define NETWORK_INTERFACE_H
#include <iphlpapi.h>
#include "net_util.h" #include "net_util.h"
/* /*
...@@ -86,6 +87,12 @@ extern jfieldID ni_ibaddressID; /* InterfaceAddress.address */ ...@@ -86,6 +87,12 @@ extern jfieldID ni_ibaddressID; /* InterfaceAddress.address */
extern jfieldID ni_ibbroadcastID; /* InterfaceAddress.broadcast */ extern jfieldID ni_ibbroadcastID; /* InterfaceAddress.broadcast */
extern jfieldID ni_ibmaskID; /* InterfaceAddress.maskLength */ 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 * Following includes come from iptypes.h
*/ */
...@@ -372,6 +379,7 @@ typedef struct { ...@@ -372,6 +379,7 @@ typedef struct {
UINT EnableProxy; UINT EnableProxy;
UINT EnableDns; UINT EnableDns;
} FIXED_INFO, *PFIXED_INFO; } FIXED_INFO, *PFIXED_INFO;
#endif /*!MAX_ADAPTER_DESCRIPTION_LENGTH*/
#ifndef IP_INTERFACE_NAME_INFO_DEFINED #ifndef IP_INTERFACE_NAME_INFO_DEFINED
#define IP_INTERFACE_NAME_INFO_DEFINED #define IP_INTERFACE_NAME_INFO_DEFINED
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册