Commit cecf1056 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

iphlpapi: Check for the right IP statistics structure name (for DragonFly BSD).

parent c74b1c21
...@@ -2312,6 +2312,18 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,, ...@@ -2312,6 +2312,18 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,,
#include <netinet/icmp_var.h> #include <netinet/icmp_var.h>
#endif]) #endif])
dnl Check for struct ipstat
AC_CHECK_MEMBERS([struct ipstat.ips_total],,,
[#ifdef HAVE_NETINET_IP_VAR_H
#include <netinet/ip_var.h>
#endif])
dnl Check for struct ip_stats
AC_CHECK_MEMBERS([struct ip_stats.ips_total],,,
[#ifdef HAVE_NETINET_IP_VAR_H
#include <netinet/ip_var.h>
#endif])
dnl Check for struct ifreq.ifr_hwaddr dnl Check for struct ifreq.ifr_hwaddr
AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr],,, AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr],,,
[#ifdef HAVE_SYS_TYPES_H [#ifdef HAVE_SYS_TYPES_H
......
...@@ -659,12 +659,16 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats) ...@@ -659,12 +659,16 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats)
} }
if (kc) kstat_close( kc ); if (kc) kstat_close( kc );
} }
#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) #elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) && (HAVE_STRUCT_IPSTAT_IPS_TOTAL || HAVE_STRUCT_IP_STATS_IPS_TOTAL)
{ {
int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS}; int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0])) #define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
int ip_ttl, ip_forwarding; int ip_ttl, ip_forwarding;
#if HAVE_STRUCT_IPSTAT_IPS_TOTAL
struct ipstat ip_stat; struct ipstat ip_stat;
#elif HAVE_STRUCT_IP_STATS_IPS_TOTAL
struct ip_stats ip_stat;
#endif
size_t needed; size_t needed;
needed = sizeof(ip_stat); needed = sizeof(ip_stat);
......
...@@ -794,6 +794,12 @@ ...@@ -794,6 +794,12 @@
/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ /* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_HWADDR #undef HAVE_STRUCT_IFREQ_IFR_HWADDR
/* Define to 1 if `ips_total' is a member of `struct ipstat'. */
#undef HAVE_STRUCT_IPSTAT_IPS_TOTAL
/* Define to 1 if `ips_total' is a member of `struct ip_stats'. */
#undef HAVE_STRUCT_IP_STATS_IPS_TOTAL
/* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */ /* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */
#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
...@@ -1286,6 +1292,11 @@ ...@@ -1286,6 +1292,11 @@
/* Define to 1 if the X Window System is missing or not being used. */ /* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING #undef X_DISPLAY_MISSING
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS
......
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