pkgsrc-WIP-changes archive

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

unit: Use some ideas for patches from OmniOS



Module Name:	pkgsrc-wip
Committed By:	Juraj Lutter <otis%NetBSD.org@localhost>
Pushed By:	otis
Date:		Wed Jan 13 21:50:31 2021 +0000
Changeset:	d9ee836fca09120a49b7f9a0edaaf67b45023769

Modified Files:
	unit/distinfo
	unit/patches/patch-src_nxt__router.c
	unit/patches/patch-src_nxt__unit.c
Removed Files:
	unit/patches/patch-src_nxt__service.c

Log Message:
unit: Use some ideas for patches from OmniOS

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d9ee836fca09120a49b7f9a0edaaf67b45023769

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unit/distinfo                         |  5 ++---
 unit/patches/patch-src_nxt__router.c  |  2 +-
 unit/patches/patch-src_nxt__service.c | 27 ---------------------------
 unit/patches/patch-src_nxt__unit.c    |  4 ++--
 4 files changed, 5 insertions(+), 33 deletions(-)

diffs:
diff --git a/unit/distinfo b/unit/distinfo
index f3632f3b12..6884b64465 100644
--- a/unit/distinfo
+++ b/unit/distinfo
@@ -8,8 +8,7 @@ SHA1 (patch-auto_os_conf) = 6d1cd7aef662a60d4288014eb6fadbe8c1268e55
 SHA1 (patch-src_nxt__cert.c) = c91e45f148a079b543a0d3cb277388bffb3e2854
 SHA1 (patch-src_nxt__conf__validation.c) = 99662fc0d975604fea0708a810e916991d0bf578
 SHA1 (patch-src_nxt__file.c) = 4321feeb6724378009cefacfe23470932faf35ef
-SHA1 (patch-src_nxt__router.c) = 366241f155bccf6a3291e37fef5993eb1c364b99
-SHA1 (patch-src_nxt__service.c) = 99964c1cee98b2c7965bb3b4c2691de6b768650b
-SHA1 (patch-src_nxt__unit.c) = d76768c55cd1176b83fefa2a0ccf7e7027d66331
+SHA1 (patch-src_nxt__router.c) = 366ceab22664726238c57a4650a844a0f8f1ca89
+SHA1 (patch-src_nxt__unit.c) = 008b654ad1ea140ee65ce326a1a9d3abf79fc3ec
 SHA1 (patch-src_nxt__unix.h) = c0db5bc4d9c45a3ead48627567284d8b3041b0a0
 SHA1 (patch-src_nxt__websocket__header.h) = 1b50405b187cc8a662372a1c20ab7737278135ae
diff --git a/unit/patches/patch-src_nxt__router.c b/unit/patches/patch-src_nxt__router.c
index 5aa6d4ba13..c7efa538e3 100644
--- a/unit/patches/patch-src_nxt__router.c
+++ b/unit/patches/patch-src_nxt__router.c
@@ -9,7 +9,7 @@ Silence warning.
      nxt_thread_handle_t  handle;
  
 -    handle = (nxt_thread_handle_t) obj;
-+    handle = *(nxt_thread_handle_t*) obj;
++    handle = (nxt_thread_handle_t)(uintptr_t) obj;
      link = data;
  
      nxt_thread_wait(handle);
diff --git a/unit/patches/patch-src_nxt__service.c b/unit/patches/patch-src_nxt__service.c
deleted file mode 100644
index ca3d29cf1f..0000000000
--- a/unit/patches/patch-src_nxt__service.c
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
-Do not use epoll on SmartOS/illumos, force usage of eventport.
-
---- src/nxt_service.c.orig	2020-11-19 18:12:30.000000000 +0000
-+++ src/nxt_service.c
-@@ -13,17 +13,17 @@ static const nxt_service_t  nxt_services
-     { "engine", "kqueue", &nxt_kqueue_engine },
- #endif
- 
--#if (NXT_HAVE_EPOLL_EDGE)
-+#if (NXT_HAVE_EPOLL_EDGE) && !(NXT_SOLARIS)
-     { "engine", "epoll", &nxt_epoll_edge_engine },
-     { "engine", "epoll_edge", &nxt_epoll_edge_engine },
-     { "engine", "epoll_level", &nxt_epoll_level_engine },
- 
--#elif (NXT_HAVE_EPOLL)
-+#elif (NXT_HAVE_EPOLL) && !(NXT_SOLARIS)
-     { "engine", "epoll", &nxt_epoll_level_engine },
-     { "engine", "epoll_level", &nxt_epoll_level_engine },
- #endif
- 
--#if (NXT_HAVE_EVENTPORT)
-+#if (NXT_HAVE_EVENTPORT) || (NXT_SOLARIS)
-     { "engine", "eventport", &nxt_eventport_engine },
- #endif
- 
diff --git a/unit/patches/patch-src_nxt__unit.c b/unit/patches/patch-src_nxt__unit.c
index b3e2e04158..4d377dd128 100644
--- a/unit/patches/patch-src_nxt__unit.c
+++ b/unit/patches/patch-src_nxt__unit.c
@@ -10,8 +10,8 @@ Use more apropriate format specifier for shm preix
  
 -    snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%p",
 -             lib->pid, (void *) pthread_self());
-+    snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%x",
-+             lib->pid, pthread_self());
++    snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%p",
++             lib->pid, (void *) (uintptr_t)pthread_self());
  #endif
  
  #if (NXT_HAVE_MEMFD_CREATE)


Home | Main Index | Thread Index | Old Index