Commit fb588789 authored by Nils Goroll's avatar Nils Goroll

add workaround for parameter include bug in varnish core

see f115bcad262c5464dceafe7fd616963b7a0b3f4f
parent 3e0d6ece
...@@ -65,6 +65,48 @@ AC_CHECK_HEADERS([sys/stdlib.h]) ...@@ -65,6 +65,48 @@ AC_CHECK_HEADERS([sys/stdlib.h])
AX_PROG_PERL_MODULES([Crypt::RC4 Digest::MD5 MIME::Base64], , AX_PROG_PERL_MODULES([Crypt::RC4 Digest::MD5 MIME::Base64], ,
AC_MSG_ERROR([required perl module(s) missing])) AC_MSG_ERROR([required perl module(s) missing]))
############################################################
## WORKAROUNDS
##
## for varnish versions between 4.1 and 5.1 / master commit
## f115bcad262c5464dceafe7fd616963b7a0b3f4f
## we need to define HAVE_TCP_KEEP the same way as varnish
## so as long as we support these versions, it's easiest to
## keep this test around
# Check if the OS supports TCP_KEEP(CNT|IDLE|INTVL) socket options
save_LIBS="${LIBS}"
LIBS="${LIBS} ${NET_LIBS}"
AC_CACHE_CHECK([for TCP_KEEP(CNT|IDLE|INTVL) socket options],
[ac_cv_have_tcp_keep],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
]],[[
int s = socket(AF_INET, SOCK_STREAM, 0);
int i;
i = 5;
if (setsockopt(s, IPPROTO_TCP, TCP_KEEPCNT, &i, sizeof i))
return (1);
if (setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, &i, sizeof i))
return (1);
if (setsockopt(s, IPPROTO_TCP, TCP_KEEPINTVL, &i, sizeof i))
return (1);
return (0);
]])],
[ac_cv_have_tcp_keep=yes],
[ac_cv_have_tcp_keep=no])
])
if test "$ac_cv_have_tcp_keep" = yes; then
AC_DEFINE([HAVE_TCP_KEEP], [1], [Define if OS supports TCP_KEEP* socket options])
fi
LIBS="${save_LIBS}"
############################################################ ############################################################
## Varnish version specific config ## Varnish version specific config
## ##
......
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