[Spice-devel] [spice-server v3 6/6] build-sys: Add configure check for TCP_KEEPIDLE

Christophe Fergeau cfergeau at redhat.com
Fri Mar 31 09:02:49 UTC 2017


On Thu, Mar 30, 2017 at 01:39:19PM -0400, Frediano Ziglio wrote:
> > 
> > This is only available in newer FreeBSD releases (9.1 and later), and
> > will cause build errors or older versions
> > 
> > This fixes https://bugs.freedesktop.org/show_bug.cgi?id=99213
> > ---
> >  configure.ac       | 5 +++++
> >  server/net-utils.c | 2 ++
> >  2 files changed, 7 insertions(+)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index f04585f..e5f30a0 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -50,6 +50,11 @@ AC_C_BIGENDIAN
> >  PKG_PROG_PKG_CONFIG
> >  
> >  AC_CHECK_HEADERS([sys/time.h execinfo.h linux/sockios.h])
> > +AC_CHECK_DECL([TCP_KEEPIDLE], [have_tcp_keepidle="yes"],,
> > +              [#include <netinet/tcp.h>])
> > +AS_IF([test "x$have_tcp_keepidle" = "xyes"],
> > +      [AC_DEFINE([HAVE_TCP_KEEPIDLE],1,[Define to 1 if <netinet/tcp.h> has a
> > TCP_KEEPIDLE definition])],
> > +)
> >  AC_FUNC_ALLOCA
> >  
> 
> Why not putting the AC_DEFINE where the have_tcp_keepidle assign is?

I had a more complex intermediate version, and did not go all the way
while simplifying it. I'll keep it this way as this makes the lines
slightly shorter (yeah, lame reason for being lazy and not changing the
patch ;)


> [...]
> Works in both way
> 
> Acked-by: Frediano Ziglio <fziglio at redhat.com>
> 

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170331/f8838f3d/attachment.sig>


More information about the Spice-devel mailing list