[Spice-commits] Branch 'freebsd' - 2 commits - server/net-utils.c server/red-stream.cpp
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Apr 17 10:13:23 UTC 2021
Rebased ref, commits from common ancestor:
commit f6e4676e55c8fcb7bce4fd6a4e1cec2f0d42d14c
Author: Roman Bogorodskiy <bogorodskiy at gmail.com>
Date: Sat Apr 17 12:52:11 2021 +0400
Fix setsockopt on FreeBSD
FreeBSD's setsockopt() behaves just like Dawrin, i.e. sets errno to
EINVAL instead of ENOTSUP, so extend the Darwin workaround to work for
FreeBSD as well.
Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
Acked-by: Frediano Ziglio <freddy77 at gmail.com>
diff --git a/server/net-utils.c b/server/net-utils.c
index e9778e73..7cad5342 100644
--- a/server/net-utils.c
+++ b/server/net-utils.c
@@ -48,7 +48,7 @@
static inline bool
darwin_einval_on_unix_socket(int fd, int err)
{
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
if (err == EINVAL) {
union {
struct sockaddr sa;
commit 039831e514556f25554becc45d1dece0e2591b0e
Author: Roman Bogorodskiy <bogorodskiy at gmail.com>
Date: Sat Apr 17 12:52:10 2021 +0400
red-stream: add missing include
On FreeBSD, netinet/in.h needs to be included to use IPPROTO_TCP.
Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
Acked-by: Frediano Ziglio <freddy77 at gmail.com>
diff --git a/server/red-stream.cpp b/server/red-stream.cpp
index fee45f30..090883f3 100644
--- a/server/red-stream.cpp
+++ b/server/red-stream.cpp
@@ -24,6 +24,7 @@
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
+#include <netinet/in.h>
#else
#include <ws2tcpip.h>
#endif
More information about the Spice-commits
mailing list