Bug 99213 - spice FTBFS on debian kfreebsd-*
Summary: spice FTBFS on debian kfreebsd-*
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
Depends on:
Reported: 2016-12-28 20:17 UTC by Laurent Bigonville
Modified: 2018-06-03 10:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Laurent Bigonville 2016-12-28 20:17:07 UTC

It seems that spice FTBFS on kfreebsd as "TCP_KEEPIDLE" is not defined on this architecture and seems to be Linux only.

The presence of this option should be detected a build/configure time
Comment 1 Christophe Fergeau 2017-01-02 11:30:58 UTC
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;
     int keepalive_timeout = KEEPALIVE_TIMEOUT;
     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)
     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;
     return true;
Comment 2 Pavel Grunt 2017-01-09 15:44:03 UTC
I would add AC_CHECK_DECL for the symbol, so the info that it is unavailable is in the config log
Comment 3 GitLab Migration User 2018-06-03 10:14:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/spice-server/issues/4.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.