[113494] trunk/dports/net/fwknop-client
blair at macports.org
blair at macports.org
Sun Nov 17 14:48:16 PST 2013
Revision: 113494
https://trac.macports.org/changeset/113494
Author: blair at macports.org
Date: 2013-11-17 14:48:16 -0800 (Sun, 17 Nov 2013)
Log Message:
-----------
fwknop-client: fix compile on 10.9 with clang.
Patch inspired by 23ef1d4e59833e3c0a7dc53cd374eb699a4663b8 from
https://github.com/mrash/fwknop .
Modified Paths:
--------------
trunk/dports/net/fwknop-client/Portfile
Added Paths:
-----------
trunk/dports/net/fwknop-client/files/
trunk/dports/net/fwknop-client/files/clang33-compatibility.diff
Modified: trunk/dports/net/fwknop-client/Portfile
===================================================================
--- trunk/dports/net/fwknop-client/Portfile 2013-11-17 21:33:11 UTC (rev 113493)
+++ trunk/dports/net/fwknop-client/Portfile 2013-11-17 22:48:16 UTC (rev 113494)
@@ -37,11 +37,16 @@
sha1 65bed25e9d7f4a7ccc3f15cab35b95a6f7b21873 \
sha256 caad7026e0e490c2c6e8251969bcf7066670b44463be303a54a21c13eb741ff1
+patchfiles clang33-compatibility.diff
+patch.pre_args -p1
+
use_bzip2 yes
depends_lib-append port:gnupg \
port:gpgme
+use_autoreconf yes
+
configure.args-append --disable-server
test.run yes
Added: trunk/dports/net/fwknop-client/files/clang33-compatibility.diff
===================================================================
--- trunk/dports/net/fwknop-client/files/clang33-compatibility.diff (rev 0)
+++ trunk/dports/net/fwknop-client/files/clang33-compatibility.diff 2013-11-17 22:48:16 UTC (rev 113494)
@@ -0,0 +1,69 @@
+diff --git a/configure.ac b/configure.ac
+index d1ab77f..98823c8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -257,7 +257,7 @@ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ AC_FUNC_STAT
+
+-AC_CHECK_FUNCS([bzero gettimeofday memmove memset socket strchr strcspn strdup strncasecmp strndup strrchr strspn strnlen stat chmod chown])
++AC_CHECK_FUNCS([bzero gettimeofday memmove memset socket strchr strcspn strdup strncasecmp strndup strrchr strspn strnlen stat chmod chown strlcat strlcpy])
+
+ AC_SEARCH_LIBS([socket], [socket])
+ AC_SEARCH_LIBS([inet_addr], [nsl])
+diff --git a/lib/fko_util.h b/lib/fko_util.h
+index b59e2c8..fe0557c 100644
+--- a/lib/fko_util.h
++++ b/lib/fko_util.h
+@@ -51,8 +51,13 @@ int zero_buf(char *buf, int len);
+ const char * enc_type_inttostr(const int type);
+ const char * msg_type_inttostr(const int type);
+
++#if !HAVE_STRLCAT
+ size_t strlcat(char *dst, const char *src, size_t siz);
++#endif
++
++#if !HAVE_STRLCPY
+ size_t strlcpy(char *dst, const char *src, size_t siz);
++#endif
+
+ #if defined(WIN32) || !defined(HAVE_STRNDUP)
+ char * strndup( const char * s, size_t len );
+diff --git a/lib/strlcat.c b/lib/strlcat.c
+index ca7b589..b3a24f7 100644
+--- a/lib/strlcat.c
++++ b/lib/strlcat.c
+@@ -34,6 +34,7 @@
+ */
+ #include "fko_common.h"
+
++#if !HAVE_STRLCAT
+ /*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+ * full size of dst, not space left). At most siz-1 characters
+@@ -68,5 +69,6 @@ strlcat(char *dst, const char *src, size_t siz)
+
+ return(dlen + (s - src)); /* count does not include NUL */
+ }
++#endif
+
+ /***EOF***/
+diff --git a/lib/strlcpy.c b/lib/strlcpy.c
+index 6e56ca6..526898f 100644
+--- a/lib/strlcpy.c
++++ b/lib/strlcpy.c
+@@ -34,6 +34,7 @@
+ */
+ #include "fko_common.h"
+
++#if !HAVE_STRLCPY
+ /*
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+@@ -64,5 +65,6 @@ strlcpy(char *dst, const char *src, size_t siz)
+
+ return(s - src - 1); /* count does not include NUL */
+ }
++#endif
+
+ /***EOF***/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131117/16f28c20/attachment-0001.html>
More information about the macports-changes
mailing list