iphlpapi: Check for struct icmpstat (for NetBSD).

oldstable
André Hentschel 2012-06-07 17:19:59 +02:00 committed by Alexandre Julliard
parent 20dbe91212
commit bc99d86729
4 changed files with 24 additions and 1 deletions

14
configure vendored
View File

@ -14028,6 +14028,20 @@ _ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_inhist" "ac_cv_member_struct_icmpstat_icps_inhist" "#ifdef HAVE_NETINET_ICMP_VAR
#include <netinet/icmp_var.h>
#endif
"
if test "x$ac_cv_member_struct_icmpstat_icps_inhist" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_ICMPSTAT_ICPS_INHIST 1
_ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct icmpstat" "icps_outhist" "ac_cv_member_struct_icmpstat_icps_outhist" "#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

View File

@ -2282,6 +2282,12 @@ AC_CHECK_MEMBERS([ns_msg._msg_ptr],,,
# include <arpa/nameser.h>
#endif])
dnl Check for struct icmpstat
AC_CHECK_MEMBERS([struct icmpstat.icps_inhist],,,
[#ifdef HAVE_NETINET_ICMP_VAR
#include <netinet/icmp_var.h>
#endif])
dnl Check for struct icmpstat.icps_outhist
AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,,
[#ifdef HAVE_SYS_TYPES_H

View File

@ -493,7 +493,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP stats)
}
if (kc) kstat_close( kc );
}
#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS)
#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) && defined(HAVE_STRUCT_ICMPSTAT_ICPS_INHIST)
{
int mib[] = {CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))

View File

@ -791,6 +791,9 @@
/* Define to 1 if `direction' is a member of `struct ff_effect'. */
#undef HAVE_STRUCT_FF_EFFECT_DIRECTION
/* Define to 1 if `icps_inhist' is a member of `struct icmpstat'. */
#undef HAVE_STRUCT_ICMPSTAT_ICPS_INHIST
/* Define to 1 if `icps_outhist' is a member of `struct icmpstat'. */
#undef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST