]> git.kaiwu.me - nginx.git/commitdiff
The addition of $tcpinfo_* variables has broken the build on Linux
authorRuslan Ermilov <ru@nginx.com>
Wed, 21 Mar 2012 15:35:05 +0000 (15:35 +0000)
committerRuslan Ermilov <ru@nginx.com>
Wed, 21 Mar 2012 15:35:05 +0000 (15:35 +0000)
systems with glibc versions prior to 2.7.  Fixed this by checking
the existence of "struct tcp_info" members during configuration.

auto/unix

index 7a8b6ec3df187623aba6dbe02c81f381f158d2eb..4e1f933a04949105a4588c96c8d8a548bcae1a2a 100755 (executable)
--- a/auto/unix
+++ b/auto/unix
@@ -352,6 +352,11 @@ ngx_feature_incs="#include <sys/socket.h>
 ngx_feature_path=
 ngx_feature_libs=
 ngx_feature_test="socklen_t optlen = sizeof(struct tcp_info);
+                  struct tcp_info ti;
+                  ti.tcpi_rtt = 0;
+                  ti.tcpi_rttvar = 0;
+                  ti.tcpi_snd_cwnd = 0;
+                  ti.tcpi_rcv_space = 0;
                   getsockopt(0, IPPROTO_TCP, TCP_INFO, NULL, &optlen)"
 . auto/feature