diff --git a/configure b/configure index 00de5010396..2363f46b991 100755 --- a/configure +++ b/configure @@ -23567,6 +23567,177 @@ _ACEOF fi +{ $as_echo "$as_me:$LINENO: checking for struct icmpstat.icps_outhist" >&5 +$as_echo_n "checking for struct icmpstat.icps_outhist... " >&6; } +if test "${ac_cv_member_struct_icmpstat_icps_outhist+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_ALIAS_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_ICMP_VAR +#include +#endif + +int +main () +{ +static struct icmpstat ac_aggr; +if (ac_aggr.icps_outhist) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_icmpstat_icps_outhist=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_ALIAS_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_ICMP_VAR +#include +#endif + +int +main () +{ +static struct icmpstat ac_aggr; +if (sizeof ac_aggr.icps_outhist) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_icmpstat_icps_outhist=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_icmpstat_icps_outhist=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_icmpstat_icps_outhist" >&5 +$as_echo "$ac_cv_member_struct_icmpstat_icps_outhist" >&6; } +if test "x$ac_cv_member_struct_icmpstat_icps_outhist" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST 1 +_ACEOF + + +fi + + { $as_echo "$as_me:$LINENO: checking for timezone variable" >&5 $as_echo_n "checking for timezone variable... " >&6; } if test "${ac_cv_have_timezone+set}" = set; then diff --git a/configure.ac b/configure.ac index fd760bde8e5..3b65eeac537 100644 --- a/configure.ac +++ b/configure.ac @@ -1730,6 +1730,42 @@ AC_CHECK_MEMBERS([ns_msg._msg_ptr],,, # include #endif]) +dnl Check for struct icmpstat.icps_outhist +AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,, +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_ALIAS_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_SOCKETVAR_H +#include +#endif +#ifdef HAVE_SYS_TIMEOUT_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IN_SYSTM_H +#include +#endif +#ifdef HAVE_NETINET_IP_H +#include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IP_ICMP_H +#include +#endif +#ifdef HAVE_NETINET_ICMP_VAR +#include +#endif]) + dnl Check for the external timezone variables timezone and daylight AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone, AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[timezone = 1]])],[ac_cv_have_timezone="yes"],[ac_cv_have_timezone="no"])) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 31336f982d0..b112793c40e 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -323,7 +323,7 @@ DWORD getICMPStats(MIB_ICMP *stats) stats->stats.icmpInStats.dwAddrMasks = icmp_stat.icps_inhist[ICMP_MASKREQ]; stats->stats.icmpInStats.dwAddrMaskReps = icmp_stat.icps_inhist[ICMP_MASKREPLY]; - +#ifdef HAVE_ICPS_OUTHIST /* out stats */ stats->stats.icmpOutStats.dwMsgs = icmp_stat.icps_oldshort + icmp_stat.icps_oldicmp; for(i = 0; i <= ICMP_MAXTYPE; i++) @@ -342,9 +342,13 @@ DWORD getICMPStats(MIB_ICMP *stats) stats->stats.icmpOutStats.dwTimestampReps = icmp_stat.icps_outhist[ICMP_TSTAMPREPLY]; stats->stats.icmpOutStats.dwAddrMasks = icmp_stat.icps_outhist[ICMP_MASKREQ]; stats->stats.icmpOutStats.dwAddrMaskReps = icmp_stat.icps_outhist[ICMP_MASKREPLY]; +#else /* ICPS_OUTHIST */ + memset( &stats->stats.icmpOutStats, 0, sizeof(stats->stats.icmpOutStats) ); +#endif /* ICPS_OUTHIST */ return NO_ERROR; -#else + +#else /* ICMPCTL_STATS */ FILE *fp; if (!stats) diff --git a/include/config.h.in b/include/config.h.in index 21ffe933fa2..f1c4194b535 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -720,6 +720,9 @@ /* Define to 1 if `direction' is member of `struct ff_effect'. */ #undef HAVE_STRUCT_FF_EFFECT_DIRECTION +/* Define to 1 if `icps_outhist' is member of `struct icmpstat'. */ +#undef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST + /* Define to 1 if `msg_accrights' is member of `struct msghdr'. */ #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS