pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/spice-server spice-server: fix build on macOS



details:   https://anonhg.NetBSD.org/pkgsrc/rev/208c2c4d9bce
branches:  trunk
changeset: 449871:208c2c4d9bce
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Tue Apr 06 23:43:39 2021 +0000

description:
spice-server: fix build on macOS

diffstat:

 sysutils/spice-server/distinfo                          |   6 +++---
 sysutils/spice-server/patches/patch-server_red-worker.c |  16 +++++++++++++---
 sysutils/spice-server/patches/patch-tools_reds__stat.c  |   6 +++---
 3 files changed, 19 insertions(+), 9 deletions(-)

diffs (72 lines):

diff -r 6893aa9e235a -r 208c2c4d9bce sysutils/spice-server/distinfo
--- a/sysutils/spice-server/distinfo    Tue Apr 06 22:55:18 2021 +0000
+++ b/sysutils/spice-server/distinfo    Tue Apr 06 23:43:39 2021 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.4 2021/01/10 14:53:47 jperkin Exp $
+$NetBSD: distinfo,v 1.5 2021/04/06 23:43:39 khorben 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) = b5aaee6e4bb7f0cfb89606ad026e4fa2c5f05da9
-SHA1 (patch-server_red-worker.c) = 93699283fa99299bd672f930e8b90f5951d3726a
+SHA1 (patch-server_red-worker.c) = 8cee4cafa80812e133ec7883d3544a5245f3ca58
 SHA1 (patch-server_tests_test-stream.c) = 4b06d20626f06581c40164aa6d670e9b6530cdee
 SHA1 (patch-server_tests_test-websocket.c) = 19bca4dd6f441336588a1ae224f9d3d9b9984917
-SHA1 (patch-tools_reds__stat.c) = dcf0a7152577dcd12719971a13e5fd00f0cf15d6
+SHA1 (patch-tools_reds__stat.c) = 84f465dda5da0659f2fc80d1113616ea8b8e44ac
diff -r 6893aa9e235a -r 208c2c4d9bce sysutils/spice-server/patches/patch-server_red-worker.c
--- a/sysutils/spice-server/patches/patch-server_red-worker.c   Tue Apr 06 22:55:18 2021 +0000
+++ b/sysutils/spice-server/patches/patch-server_red-worker.c   Tue Apr 06 23:43:39 2021 +0000
@@ -1,16 +1,26 @@
-$NetBSD: patch-server_red-worker.c,v 1.3 2021/01/05 15:14:39 jperkin Exp $
+$NetBSD: patch-server_red-worker.c,v 1.4 2021/04/06 23:43:40 khorben Exp $
 
 Add NetBSD support.
 
 --- 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)
+@@ -1119,6 +1119,9 @@ static void *red_worker_main(void *arg)
+ {
+     RedWorker *worker = arg;
+ 
++#if defined(__APPLE__)
++    pthread_setname_np("SPICE Worker");
++#endif
+     spice_debug("begin");
+     SPICE_VERIFY(MAX_PIPE_SIZE > WIDE_CLIENT_ACK_WINDOW &&
+            MAX_PIPE_SIZE > NARROW_CLIENT_ACK_WINDOW); //ensure wakeup by ack message
+@@ -1159,7 +1162,11 @@ bool red_worker_run(RedWorker *worker)
  #ifndef _WIN32
      pthread_sigmask(SIG_SETMASK, &curr_sig_mask, NULL);
  #endif
 +#if defined(__NetBSD__)
 +    pthread_setname_np(worker->thread, "%s", (void *)"SPICE Worker");
-+#elif !defined(__sun)
++#elif !defined(__sun) && !defined(__APPLE__)
      pthread_setname_np(worker->thread, "SPICE Worker");
 +#endif
  
diff -r 6893aa9e235a -r 208c2c4d9bce sysutils/spice-server/patches/patch-tools_reds__stat.c
--- a/sysutils/spice-server/patches/patch-tools_reds__stat.c    Tue Apr 06 22:55:18 2021 +0000
+++ b/sysutils/spice-server/patches/patch-tools_reds__stat.c    Tue Apr 06 23:43:39 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-tools_reds__stat.c,v 1.2 2021/01/10 14:53:47 jperkin Exp $
+$NetBSD: patch-tools_reds__stat.c,v 1.3 2021/04/06 23:43:40 khorben Exp $
 
-Add SunOS and NetBSD support.
+Add SunOS, NetBSD, and macOS support.
 
 --- tools/reds_stat.c.orig     2020-02-27 11:26:12.000000000 +0000
 +++ tools/reds_stat.c
@@ -10,7 +10,7 @@
              shm_size = header_size + num_of_nodes * sizeof(SpiceStatNode);
 +#if defined(__NetBSD__)
 +            reds_stat = mremap(reds_stat, shm_old_size, NULL, shm_size, 0);
-+#elif defined(__sun)
++#elif defined(__sun) || defined(__APPLE__)
 +            munmap(reds_stat, shm_old_size);
 +            reds_stat = (SpiceStat *)mmap(NULL, shm_size, PROT_READ, MAP_SHARED, fd, 0);
 +#else



Home | Main Index | Thread Index | Old Index