[135159] trunk/dports/security/stunnel

ciserlohn at macports.org ciserlohn at macports.org
Fri Apr 17 01:16:01 PDT 2015


Revision: 135159
          https://trac.macports.org/changeset/135159
Author:   ciserlohn at macports.org
Date:     2015-04-17 01:16:01 -0700 (Fri, 17 Apr 2015)
Log Message:
-----------
stunnel: fix build on Leopard and Snow Leopard (maintainer; closes #47481)

Modified Paths:
--------------
    trunk/dports/security/stunnel/Portfile

Added Paths:
-----------
    trunk/dports/security/stunnel/files/patch-src-client.c.diff
    trunk/dports/security/stunnel/files/patch-src-log.c.diff

Modified: trunk/dports/security/stunnel/Portfile
===================================================================
--- trunk/dports/security/stunnel/Portfile	2015-04-17 02:13:42 UTC (rev 135158)
+++ trunk/dports/security/stunnel/Portfile	2015-04-17 08:16:01 UTC (rev 135159)
@@ -50,6 +50,18 @@
 
 default_variants    +libwrap
 
+platform darwin 9 {
+    # 10.5 has issues building with gcc 4.2 https://trac.macports.org/ticket/47481
+    patchfiles-append   patch-src-client.c.diff \
+    patch-src-log.c.diff
+}
+
+platform darwin 10 {
+    # 10.6 has issues building with gcc 4.2 https://trac.macports.org/ticket/47481
+    patchfiles-append   patch-src-client.c.diff \
+    patch-src-log.c.diff
+}
+ 		 
 # Tell the user about the stupid fake certificate that we provide.
 notes "
 A fake certificate has been installed as ${prefix}/etc/stunnel/stunnel.pem

Added: trunk/dports/security/stunnel/files/patch-src-client.c.diff
===================================================================
--- trunk/dports/security/stunnel/files/patch-src-client.c.diff	                        (rev 0)
+++ trunk/dports/security/stunnel/files/patch-src-client.c.diff	2015-04-17 08:16:01 UTC (rev 135159)
@@ -0,0 +1,21 @@
+--- src/client.c.orig	2015-04-11 15:08:14.000000000 -0500
++++ src/client.c	2015-04-16 19:39:11.000000000 -0500
+@@ -167,18 +167,10 @@
+     if(!err)
+         client_try(c);
+     rst=err==1 && c->opt->option.reset;
+-#ifdef __GNUC__
+-#pragma GCC diagnostic push
+-#pragma GCC diagnostic ignored "-Wformat"
+-#pragma GCC diagnostic ignored "-Wformat-extra-args"
+-#endif /* __GNUC__ */
+     s_log(LOG_NOTICE,
+         "Connection %s: %llu byte(s) sent to SSL, %llu byte(s) sent to socket",
+         rst ? "reset" : "closed",
+         (unsigned long long)c->ssl_bytes, (unsigned long long)c->sock_bytes);
+-#ifdef __GNUC__
+-#pragma GCC diagnostic pop
+-#endif /* __GNUC__ */
+ 
+         /* cleanup temporary (e.g. IDENT) socket */
+     if(c->fd!=INVALID_SOCKET)

Added: trunk/dports/security/stunnel/files/patch-src-log.c.diff
===================================================================
--- trunk/dports/security/stunnel/files/patch-src-log.c.diff	                        (rev 0)
+++ trunk/dports/security/stunnel/files/patch-src-log.c.diff	2015-04-17 08:16:01 UTC (rev 135159)
@@ -0,0 +1,29 @@
+--- src/log.c.orig	2015-04-11 15:08:14.000000000 -0500
++++ src/log.c	2015-04-16 19:41:58.000000000 -0500
+@@ -266,15 +266,7 @@
+         enter_critical_section(CRIT_ID);
+         my_seq=seq++;
+         leave_critical_section(CRIT_ID);
+-#ifdef __GNUC__
+-#pragma GCC diagnostic push
+-#pragma GCC diagnostic ignored "-Wformat"
+-#pragma GCC diagnostic ignored "-Wformat-extra-args"
+-#endif /* __GNUC__ */
+         return str_printf("%llu", my_seq);
+-#ifdef __GNUC__
+-#pragma GCC diagnostic pop
+-#endif /* __GNUC__ */
+     case LOG_ID_UNIQUE:
+         if(RAND_bytes(rnd, sizeof rnd)<=0) /* log2(62^22)=130.99 */
+             return str_dup("error");
+@@ -302,10 +294,6 @@
+ 
+ /* critical problem handling */
+ /* str.c functions are not safe to use here */
+-#ifdef __GNUC__
+-#pragma GCC diagnostic push
+-#pragma GCC diagnostic ignored "-Wunused-result"
+-#endif /* __GNUC__ */
+ void fatal_debug(char *txt, const char *file, int line) {
+     char msg[80];
+ #ifdef USE_WIN32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150417/b6f024a3/attachment.html>


More information about the macports-changes mailing list