Commit 99d247ad authored by Charles Davis's avatar Charles Davis Committed by Alexandre Julliard

iphlpapi: Add missing header to configure test.

This lets GetIcmpStatistics() work again on FreeBSD. Signed-off-by: 's avatarCharles Davis <cdavis5x@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 9b90266c
...@@ -16768,6 +16768,9 @@ fi ...@@ -16768,6 +16768,9 @@ fi
ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_inhist" "ac_cv_member_struct_icmpstat_icps_inhist" "#ifdef HAVE_SYS_TYPES_H ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_inhist" "ac_cv_member_struct_icmpstat_icps_inhist" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IP_H #ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h> #include <netinet/ip.h>
#endif #endif
......
...@@ -2380,6 +2380,9 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_inhist],,, ...@@ -2380,6 +2380,9 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_inhist],,,
[#ifdef HAVE_SYS_TYPES_H [#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IP_H #ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h> #include <netinet/ip.h>
#endif #endif
......
...@@ -510,7 +510,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats) ...@@ -510,7 +510,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats)
} }
if (kc) kstat_close( kc ); if (kc) kstat_close( kc );
} }
#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) && defined(HAVE_STRUCT_ICMPSTAT_ICPS_INHIST) #elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) && (defined(HAVE_STRUCT_ICMPSTAT_ICPS_INHIST) || defined(HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST))
{ {
int mib[] = {CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS}; int mib[] = {CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0])) #define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
...@@ -520,6 +520,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats) ...@@ -520,6 +520,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats)
if(sysctl(mib, MIB_LEN, &icmp_stat, &needed, NULL, 0) != -1) if(sysctl(mib, MIB_LEN, &icmp_stat, &needed, NULL, 0) != -1)
{ {
#ifdef HAVE_STRUCT_ICMPSTAT_ICPS_INHIST
/*in stats */ /*in stats */
stats->stats.icmpInStats.dwMsgs = icmp_stat.icps_badcode + icmp_stat.icps_checksum + icmp_stat.icps_tooshort + icmp_stat.icps_badlen; stats->stats.icmpInStats.dwMsgs = icmp_stat.icps_badcode + icmp_stat.icps_checksum + icmp_stat.icps_tooshort + icmp_stat.icps_badlen;
for(i = 0; i <= ICMP_MAXTYPE; i++) for(i = 0; i <= ICMP_MAXTYPE; i++)
...@@ -538,6 +539,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats) ...@@ -538,6 +539,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats)
stats->stats.icmpInStats.dwTimestampReps = icmp_stat.icps_inhist[ICMP_TSTAMPREPLY]; stats->stats.icmpInStats.dwTimestampReps = icmp_stat.icps_inhist[ICMP_TSTAMPREPLY];
stats->stats.icmpInStats.dwAddrMasks = icmp_stat.icps_inhist[ICMP_MASKREQ]; stats->stats.icmpInStats.dwAddrMasks = icmp_stat.icps_inhist[ICMP_MASKREQ];
stats->stats.icmpInStats.dwAddrMaskReps = icmp_stat.icps_inhist[ICMP_MASKREPLY]; stats->stats.icmpInStats.dwAddrMaskReps = icmp_stat.icps_inhist[ICMP_MASKREPLY];
#endif
#ifdef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST #ifdef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST
/* out stats */ /* out stats */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment