<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:teuf@gnome.org" title="Christophe Fergeau <teuf@gnome.org>"> <span class="fn">Christophe Fergeau</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - spice FTBFS on debian kfreebsd-*"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99213">bug 99213</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>teuf@gnome.org
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - spice FTBFS on debian kfreebsd-*"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99213#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - spice FTBFS on debian kfreebsd-*"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99213">bug 99213</a>
from <span class="vcard"><a class="email" href="mailto:teuf@gnome.org" title="Christophe Fergeau <teuf@gnome.org>"> <span class="fn">Christophe Fergeau</span></a>
</span></b>
<pre>On FreeBSD older than 9.1, it seems TCP_KEEPIDLE is not available and does not
have a replacement (
<a href="https://lists.freebsd.org/pipermail/freebsd-net/2013-May/035496.html">https://lists.freebsd.org/pipermail/freebsd-net/2013-May/035496.html</a> ). 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;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>