[Bug 99213] spice FTBFS on debian kfreebsd-*
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Jan 2 11:30:58 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=99213
Christophe Fergeau <teuf at gnome.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |teuf at gnome.org
--- Comment #1 from Christophe Fergeau <teuf at gnome.org> ---
On FreeBSD older than 9.1, it seems TCP_KEEPIDLE is not available and does not
have a replacement (
https://lists.freebsd.org/pipermail/freebsd-net/2013-May/035496.html ). I don't
know if this means anything for kfreebsd though.
One way of handling this is to wrap its use in #ifdef TCP_KEEPIDLE
diff --git a/server/reds.c b/server/reds.c
index 6064a6d..0c8fb35 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2329,7 +2329,9 @@ static void reds_handle_ssl_accept(int fd, int event,
void *data)
static bool reds_init_keepalive(int socket)
{
int keepalive = 1;
+#ifdef TCP_KEEPIDLE
int keepalive_timeout = KEEPALIVE_TIMEOUT;
+#endif
if (setsockopt(socket, SOL_SOCKET, SO_KEEPALIVE, &keepalive,
sizeof(keepalive)) == -1) {
if (errno != ENOTSUP) {
@@ -2338,6 +2340,7 @@ static bool reds_init_keepalive(int socket)
}
}
+#ifdef TCP_KEEPIDLE
if (setsockopt(socket, SOL_TCP, TCP_KEEPIDLE,
&keepalive_timeout, sizeof(keepalive_timeout)) == -1) {
if (errno != ENOTSUP) {
@@ -2345,6 +2348,7 @@ static bool reds_init_keepalive(int socket)
return false;
}
}
+#endif
return true;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-bugs/attachments/20170102/2c613b3e/attachment.html>
More information about the spice-bugs
mailing list