Sun Aug 22 05:10:19 2021 UTC ()
unit: fix SunOS build

Part of this might be better fixed differently in the problematic code,
but this addresses it for now.


(gutteridge)
diff -r1.4 -r1.5 pkgsrc/www/unit/Makefile
diff -r1.2 -r1.3 pkgsrc/www/unit/distinfo
diff -r0 -r1.1 pkgsrc/www/unit/patches/patch-src_nxt__thread.h

cvs diff -r1.4 -r1.5 pkgsrc/www/unit/Makefile (expand / switch to unified diff)

--- pkgsrc/www/unit/Makefile 2021/08/22 04:00:43 1.4
+++ pkgsrc/www/unit/Makefile 2021/08/22 05:10:19 1.5
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1# $NetBSD: Makefile,v 1.4 2021/08/22 04:00:43 gutteridge Exp $ 1# $NetBSD: Makefile,v 1.5 2021/08/22 05:10:19 gutteridge Exp $
2 2
3.include "../../www/unit/version.mk" 3.include "../../www/unit/version.mk"
4 4
5DISTNAME= unit-${UNIT_VERSION} 5DISTNAME= unit-${UNIT_VERSION}
6 6
7COMMENT= Dynamic web application server 7COMMENT= Dynamic web application server
8 8
9MAINTAINER= osa@FreeBSD.org 9MAINTAINER= osa@FreeBSD.org
10 10
11RCD_SCRIPTS= unit 11RCD_SCRIPTS= unit
12 12
 13BUILDLINK_TRANSFORM.SunOS+= rm:-Werror
 14
13.include "../../www/unit/Makefile.common" 15.include "../../www/unit/Makefile.common"
14.include "../../mk/bsd.pkg.mk" 16.include "../../mk/bsd.pkg.mk"

cvs diff -r1.2 -r1.3 pkgsrc/www/unit/distinfo (expand / switch to unified diff)

--- pkgsrc/www/unit/distinfo 2021/08/22 04:00:43 1.2
+++ pkgsrc/www/unit/distinfo 2021/08/22 05:10:19 1.3
@@ -1,12 +1,13 @@ @@ -1,12 +1,13 @@
1$NetBSD: distinfo,v 1.2 2021/08/22 04:00:43 gutteridge Exp $ 1$NetBSD: distinfo,v 1.3 2021/08/22 05:10:19 gutteridge Exp $
2 2
3SHA1 (unit-1.25.0.tar.gz) = f235f96f7f51f169bae85222dbc8c93ece69d589 3SHA1 (unit-1.25.0.tar.gz) = f235f96f7f51f169bae85222dbc8c93ece69d589
4RMD160 (unit-1.25.0.tar.gz) = d08da7f6404e3fad4a69f31ba203cc9a3b69024c 4RMD160 (unit-1.25.0.tar.gz) = d08da7f6404e3fad4a69f31ba203cc9a3b69024c
5SHA512 (unit-1.25.0.tar.gz) = fc001ab21c5aa6c07b092f7b1f44be3b88636f9e2059c8bc4049a06d863daae1bbfa2531a4a24bdd5976250d7a0e260dcf0dbb0dec63efcc008b5398c6bb4bbd 5SHA512 (unit-1.25.0.tar.gz) = fc001ab21c5aa6c07b092f7b1f44be3b88636f9e2059c8bc4049a06d863daae1bbfa2531a4a24bdd5976250d7a0e260dcf0dbb0dec63efcc008b5398c6bb4bbd
6Size (unit-1.25.0.tar.gz) = 853280 bytes 6Size (unit-1.25.0.tar.gz) = 853280 bytes
7SHA1 (patch-auto_events) = 0347dfefbedaacd206c8c2bfd8ea38b18995dd9f 7SHA1 (patch-auto_events) = 0347dfefbedaacd206c8c2bfd8ea38b18995dd9f
8SHA1 (patch-auto_os_conf) = 6d1cd7aef662a60d4288014eb6fadbe8c1268e55 8SHA1 (patch-auto_os_conf) = 6d1cd7aef662a60d4288014eb6fadbe8c1268e55
9SHA1 (patch-src_nxt__kqueue__engine.c) = c341425f4b21d4cff6e003958f88a04b53dc4ee1 9SHA1 (patch-src_nxt__kqueue__engine.c) = c341425f4b21d4cff6e003958f88a04b53dc4ee1
10SHA1 (patch-src_nxt__php__sapi.c) = 2d5e557ff2066bec78f5bfbca6a64688f60da01b 10SHA1 (patch-src_nxt__php__sapi.c) = 2d5e557ff2066bec78f5bfbca6a64688f60da01b
 11SHA1 (patch-src_nxt__thread.h) = 48e679dbfd469604ee0277fde84507c2a99c4e53
11SHA1 (patch-src_nxt__unix.h) = c0db5bc4d9c45a3ead48627567284d8b3041b0a0 12SHA1 (patch-src_nxt__unix.h) = c0db5bc4d9c45a3ead48627567284d8b3041b0a0
12SHA1 (patch-src_nxt__websocket__header.h) = 1b50405b187cc8a662372a1c20ab7737278135ae 13SHA1 (patch-src_nxt__websocket__header.h) = 1b50405b187cc8a662372a1c20ab7737278135ae

File Added: pkgsrc/www/unit/patches/Attic/patch-src_nxt__thread.h
$NetBSD: patch-src_nxt__thread.h,v 1.1 2021/08/22 05:10:19 gutteridge Exp $

SunOS defines PTHREAD_STACK_MIN as a function call.

--- src/nxt_thread.h.orig	1970-01-01 00:00:00.000000000 +0000
+++ src/nxt_thread.h
@@ -142,7 +142,7 @@ nxt_thread_yield()
 #endif
 
 
-#if (PTHREAD_STACK_MIN)
+#ifdef PTHREAD_STACK_MIN
 #define NXT_THREAD_STACK_MIN  PTHREAD_STACK_MIN
 
 #else