spice-server: Fix build on SunOS.
This commit is contained in:
parent
1b9f843542
commit
3047656607
6 changed files with 65 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.4 2020/11/01 19:36:37 maya Exp $
|
||||
# $NetBSD: Makefile,v 1.5 2021/01/05 15:14:38 jperkin Exp $
|
||||
|
||||
DISTNAME= spice-0.14.3
|
||||
PKGNAME= ${DISTNAME:S/spice/spice-server/}
|
||||
|
@ -17,6 +17,8 @@ USE_TOOLS+= gmake pkg-config
|
|||
|
||||
PKGCONFIG_OVERRIDE+= spice-server.pc.in
|
||||
|
||||
LDFLAGS.SunOS+= -lnsl -lsocket
|
||||
|
||||
.include "../../audio/libopus/buildlink3.mk"
|
||||
.include "../../devel/glib2/buildlink3.mk"
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
$NetBSD: distinfo,v 1.2 2020/11/01 19:36:37 maya Exp $
|
||||
$NetBSD: distinfo,v 1.3 2021/01/05 15:14:38 jperkin Exp $
|
||||
|
||||
SHA1 (spice-0.14.3.tar.bz2) = f5968dd5df5f64805d093b4c85b4165959e6c65b
|
||||
RMD160 (spice-0.14.3.tar.bz2) = fe99d8d0db4b275b1d19dc9a7231144133c5bfa0
|
||||
SHA512 (spice-0.14.3.tar.bz2) = 9ecdc455ff25c71ac1fe6c576654b51efbfb860110bd6828065d23f7462d5c5cac772074d1a40f033386258d970b77275b2007bcfdffb23fdff2137154ea46e4
|
||||
Size (spice-0.14.3.tar.bz2) = 1504304 bytes
|
||||
SHA1 (patch-server_red-stream.c) = ba48da44bf4a3a94cf85df3bc486e182bea6afaf
|
||||
SHA1 (patch-server_red-worker.c) = 8478e2ce8959061bd15ea226debc76744378c8cf
|
||||
SHA1 (patch-server_tests_test-websocket.c) = 8ae8bc975bf81e7683e9f15d1e158899e52f7cc4
|
||||
SHA1 (patch-server_red-stream.c) = b5aaee6e4bb7f0cfb89606ad026e4fa2c5f05da9
|
||||
SHA1 (patch-server_red-worker.c) = 93699283fa99299bd672f930e8b90f5951d3726a
|
||||
SHA1 (patch-server_tests_test-stream.c) = 4b06d20626f06581c40164aa6d670e9b6530cdee
|
||||
SHA1 (patch-server_tests_test-websocket.c) = 19bca4dd6f441336588a1ae224f9d3d9b9984917
|
||||
SHA1 (patch-tools_reds__stat.c) = 3464bbb8b25aa871adfbc501412f84ad925f6509
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
$NetBSD: patch-server_red-stream.c,v 1.2 2020/11/01 19:36:37 maya Exp $
|
||||
$NetBSD: patch-server_red-stream.c,v 1.3 2021/01/05 15:14:39 jperkin Exp $
|
||||
|
||||
Fix build on SunOS.
|
||||
No TCP_CORK on netbsd. Disable (like win32)
|
||||
|
||||
--- server/red-stream.c.orig 2020-02-27 11:26:12.000000000 +0000
|
||||
+++ server/red-stream.c
|
||||
@@ -105,7 +105,7 @@ struct RedStreamPrivate {
|
||||
@@ -17,6 +17,15 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
+#if defined(__sun)
|
||||
+#define MSG_NOSIGNAL 0
|
||||
+# if __STDC_VERSION__ - 0 < 199901L
|
||||
+#define _XOPEN_SOURCE 500
|
||||
+# else
|
||||
+#define _XOPEN_SOURCE 600
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
@@ -105,7 +114,7 @@ struct RedStreamPrivate {
|
||||
SpiceCoreInterfaceInternal *core;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: patch-server_red-worker.c,v 1.2 2020/11/01 19:36:37 maya Exp $
|
||||
$NetBSD: patch-server_red-worker.c,v 1.3 2021/01/05 15:14:39 jperkin Exp $
|
||||
|
||||
Add NetBSD support.
|
||||
|
||||
--- server/red-worker.c.orig 2019-04-30 08:51:11.000000000 +0000
|
||||
--- server/red-worker.c.orig 2020-02-27 11:26:12.000000000 +0000
|
||||
+++ server/red-worker.c
|
||||
@@ -1159,7 +1159,11 @@ bool red_worker_run(RedWorker *worker)
|
||||
#ifndef _WIN32
|
||||
|
@ -10,7 +10,7 @@ Add NetBSD support.
|
|||
#endif
|
||||
+#if defined(__NetBSD__)
|
||||
+ pthread_setname_np(worker->thread, "%s", (void *)"SPICE Worker");
|
||||
+#else
|
||||
+#elif !defined(__sun)
|
||||
pthread_setname_np(worker->thread, "SPICE Worker");
|
||||
+#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-server_tests_test-stream.c,v 1.1 2021/01/05 15:14:39 jperkin Exp $
|
||||
|
||||
Fix build on SunOS.
|
||||
|
||||
--- server/tests/test-stream.c.orig 2020-02-27 11:26:12.000000000 +0000
|
||||
+++ server/tests/test-stream.c
|
||||
@@ -17,6 +17,14 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
+#if defined(__sun)
|
||||
+# if __STDC_VERSION__ - 0 < 199901L
|
||||
+#define _XOPEN_SOURCE 500
|
||||
+# else
|
||||
+#define _XOPEN_SOURCE 600
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
|
@ -1,10 +1,21 @@
|
|||
$NetBSD: patch-server_tests_test-websocket.c,v 1.1 2020/11/01 19:36:37 maya Exp $
|
||||
$NetBSD: patch-server_tests_test-websocket.c,v 1.2 2021/01/05 15:14:39 jperkin Exp $
|
||||
|
||||
Provide a fallback definition for SOL_TCP (for netbsd)
|
||||
Provide fallback definitions for MSG_NOSIGNAL (SunOS) and SOL_TCP (NetBSD)
|
||||
|
||||
--- server/tests/test-websocket.c.orig 2020-02-27 11:26:12.000000000 +0000
|
||||
+++ server/tests/test-websocket.c
|
||||
@@ -200,6 +200,9 @@ handle_client(int new_sock)
|
||||
@@ -42,6 +42,10 @@
|
||||
#include "net-utils.h"
|
||||
#include "websocket.h"
|
||||
|
||||
+#if !defined(MSG_NOSIGNAL)
|
||||
+#define MSG_NOSIGNAL 0
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
on data arrived on socket:
|
||||
try to read data, read again till error, handle error, on EAGAIN polling again
|
||||
@@ -200,6 +204,9 @@ handle_client(int new_sock)
|
||||
}
|
||||
|
||||
int enable = 1;
|
||||
|
|
Loading…
Reference in a new issue