Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
eaab7a88
Commit
eaab7a88
authored
Jun 03, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Jun 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Check for the right TCP statistics structure name (for DragonFly BSD).
parent
cecf1056
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
1 deletion
+51
-1
configure
configure
+28
-0
configure.ac
configure.ac
+12
-0
ipstats.c
dlls/iphlpapi/ipstats.c
+5
-1
config.h.in
include/config.h.in
+6
-0
No files found.
configure
View file @
eaab7a88
...
...
@@ -14086,6 +14086,34 @@ _ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct tcpstat"
"tcps_connattempt"
"ac_cv_member_struct_tcpstat_tcps_connattempt"
"#ifdef HAVE_NETINET_TCP_VAR_H
#include <netinet/tcp_var.h>
#endif
"
if
test
"x
$ac_cv_member_struct_tcpstat_tcps_connattempt
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT 1
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct tcp_stats"
"tcps_connattempt"
"ac_cv_member_struct_tcp_stats_tcps_connattempt"
"#ifdef HAVE_NETINET_TCP_VAR_H
#include <netinet/tcp_var.h>
#endif
"
if
test
"x
$ac_cv_member_struct_tcp_stats_tcps_connattempt
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT 1
_ACEOF
fi
ac_fn_c_check_member
"
$LINENO
"
"struct ifreq"
"ifr_hwaddr"
"ac_cv_member_struct_ifreq_ifr_hwaddr"
"#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
...
...
configure.ac
View file @
eaab7a88
...
...
@@ -2324,6 +2324,18 @@ AC_CHECK_MEMBERS([struct ip_stats.ips_total],,,
#include <netinet/ip_var.h>
#endif])
dnl Check for struct tcpstat
AC_CHECK_MEMBERS([struct tcpstat.tcps_connattempt],,,
[#ifdef HAVE_NETINET_TCP_VAR_H
#include <netinet/tcp_var.h>
#endif])
dnl Check for struct tcp_stats
AC_CHECK_MEMBERS([struct tcp_stats.tcps_connattempt],,,
[#ifdef HAVE_NETINET_TCP_VAR_H
#include <netinet/tcp_var.h>
#endif])
dnl Check for struct ifreq.ifr_hwaddr
AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr],,,
[#ifdef HAVE_SYS_TYPES_H
...
...
dlls/iphlpapi/ipstats.c
View file @
eaab7a88
...
...
@@ -812,7 +812,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
}
if
(
kc
)
kstat_close
(
kc
);
}
#elif defined(HAVE_SYS_SYSCTL_H) && defined(
UDPCTL_STATS
)
#elif defined(HAVE_SYS_SYSCTL_H) && defined(
TCPCTL_STATS) && (HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT || HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT
)
{
#ifndef TCPTV_MIN
/* got removed in Mac OS X for some reason */
#define TCPTV_MIN 2
...
...
@@ -821,7 +821,11 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
int
mib
[]
=
{
CTL_NET
,
PF_INET
,
IPPROTO_TCP
,
TCPCTL_STATS
};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
#define hz 1000
#if HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT
struct
tcpstat
tcp_stat
;
#elif HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT
struct
tcp_stats
tcp_stat
;
#endif
size_t
needed
=
sizeof
(
tcp_stat
);
if
(
sysctl
(
mib
,
MIB_LEN
,
&
tcp_stat
,
&
needed
,
NULL
,
0
)
!=
-
1
)
...
...
include/config.h.in
View file @
eaab7a88
...
...
@@ -857,6 +857,12 @@
/* Define to 1 if `st_mtim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIM
/* Define to 1 if `tcps_connattempt' is a member of `struct tcpstat'. */
#undef HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT
/* Define to 1 if `tcps_connattempt' is a member of `struct tcp_stats'. */
#undef HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT
/* Define to 1 if the system has the type `struct xinpgen'. */
#undef HAVE_STRUCT_XINPGEN
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment