View | Details | Raw Unified | Return to bug 83245
Collapse All | Expand All

(-)Makefile (-6 / +4 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	stunnel
8
PORTNAME=	stunnel
9
PORTVERSION=	4.10
9
PORTVERSION=	4.11
10
PORTREVISION=	3
11
CATEGORIES=	security
10
CATEGORIES=	security
12
MASTER_SITES=	http://www.stunnel.org/download/stunnel/src/ \
11
MASTER_SITES=	http://www.stunnel.org/download/stunnel/src/ \
13
		ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
12
		ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
Lines 47-59 Link Here
47
BROKEN=	'The WITH_UCONTEXT, WITH_FORK and WITH_PTHREAD options are mutually exclusive - please specify at most one of them, the default is WITH_PTHREAD'
46
BROKEN=	'The WITH_UCONTEXT, WITH_FORK and WITH_PTHREAD options are mutually exclusive - please specify at most one of them, the default is WITH_PTHREAD'
48
.endif
47
.endif
49
48
50
CFLAGS+=-DFORCE_THREADING_MODEL
51
.if defined(WITH_UCONTEXT)
49
.if defined(WITH_UCONTEXT)
52
CFLAGS+=-DFORCE_UCONTEXT
50
CONFIGURE_ARGS+=	--with-threads=ucontext
53
.elif defined(WITH_FORK)
51
.elif defined(WITH_FORK)
54
CFLAGS+=-DFORCE_FORK
52
CONFIGURE_ARGS+=	--with-threads=fork
55
.else
53
.else
56
CFLAGS+=-DFORCE_PTHREAD
54
CONFIGURE_ARGS+=	CFLAGS=${PTHREAD_CFLAGS} LDFLAGS=${PTHREAD_LIBS} --with-threads=pthread
57
.endif
55
.endif
58
56
59
post-patch:
57
post-patch:
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (stunnel-4.10.tar.gz) = 9de7a62a44083114779ca4e109d70776
1
MD5 (stunnel-4.11.tar.gz) = 253c50435d4d81cba6f19ca34266e6dc
2
SIZE (stunnel-4.10.tar.gz) = 487066
2
SIZE (stunnel-4.11.tar.gz) = 484559
(-)files/patch-src::common.h (-50 lines)
Lines 1-50 Link Here
1
--- src/common.h.orig	Sat Apr 23 13:40:10 2005
2
+++ src/common.h	Tue Jun 14 08:27:11 2005
3
@@ -38,17 +38,44 @@
4
 #endif
5
 
6
 /* threads model */
7
+#if defined(FORCE_THREADING_MODEL)
8
+
9
+#undef USE_UCONTEXT
10
+#undef USE_PTHREAD
11
+#undef USE_FORK
12
+
13
+#ifdef FORCE_UCONTEXT
14
+#define USE_UCONTEXT
15
+#else
16
+#ifdef FORCE_PTHREAD
17
+#define USE_PTHREAD
18
+#else
19
+#define USE_FORK
20
+#endif	/* FORCE_PTHREAD */
21
+#endif	/* FORCE_UCONTEXT */
22
+
23
+#else	/* FORCE_THREADING_MODEL */
24
+
25
 #if HAVE_UCONTEXT_H && HAVE_GETCONTEXT && HAVE_POLL
26
 #define USE_UCONTEXT
27
-#include <ucontext.h>
28
 #elif HAVE_PTHREAD_H && HAVE_LIBPTHREAD
29
 #define USE_PTHREAD
30
+#else
31
+#define USE_FORK
32
+#endif
33
+
34
+#endif	/* FORCE_THREADING_MODEL */
35
+
36
+#ifdef USE_UCONTEXT
37
+#include <sys/types.h>
38
+#include <ucontext.h>
39
+#endif
40
+
41
+#ifdef USE_PTHREAD
42
 #include <pthread.h>
43
 #define THREADS
44
 #define _REENTRANT
45
 #define _THREAD_SAFE
46
-#else
47
-#define USE_FORK
48
 #endif
49
 
50
 /* TCP wrapper */
(-)files/patch-src::sthreads.c (-12 lines)
Lines 1-12 Link Here
1
*** src/sthreads.c.old	Mon Jun 13 21:34:53 2005
2
--- src/sthreads.c	Mon Jun 13 22:15:01 2005
3
***************
4
*** 63,68 ****
5
--- 63,69 ----
6
  
7
  static void ctx_cleanup_func(void) { /* cleanup the active thread */
8
      s_log(LOG_DEBUG, "Context %ld closed", ready_head->id);
9
+     makecontext(&ctx_cleanup, ctx_cleanup_func, 0);
10
      s_poll_wait(NULL, 0); /* wait on poll() */
11
  }
12
  

Return to bug 83245