=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: iphlpapi: Check for struct icmpstat (for NetBSD).

Alexandre Julliard julliard at winehq.org
Fri Jun 8 13:36:13 CDT 2012


Module: wine
Branch: master
Commit: bc99d86729a4f2ce25478d0f36b88b5ba1d7ed7b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bc99d86729a4f2ce25478d0f36b88b5ba1d7ed7b

Author: André Hentschel <nerv at dawncrow.de>
Date:   Thu Jun  7 17:19:59 2012 +0200

iphlpapi: Check for struct icmpstat (for NetBSD).

---

 configure               |   14 ++++++++++++++
 configure.ac            |    6 ++++++
 dlls/iphlpapi/ipstats.c |    2 +-
 include/config.h.in     |    3 +++
 4 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index d9e1d65..4428a2c 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/configure.ac b/configure.ac
index c92c326..9688ba7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 285e700..0edd011 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -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]))
diff --git a/include/config.h.in b/include/config.h.in
index 20a0be3..983c732 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -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
 




More information about the wine-cvs mailing list