diff options
author | pi <pi@FreeBSD.org> | 2015-09-02 13:23:35 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2015-09-02 13:23:35 +0800 |
commit | 591e121e85b05af558b51f467dea715e2b934daa (patch) | |
tree | cf3fce6bd2ac6050fb57a4441091d6c24e19611f /net-p2p | |
parent | dcac6e65dc2667c140e9309928c83f7d67ae191a (diff) | |
download | freebsd-ports-graphics-591e121e85b05af558b51f467dea715e2b934daa.tar.gz freebsd-ports-graphics-591e121e85b05af558b51f467dea715e2b934daa.tar.zst freebsd-ports-graphics-591e121e85b05af558b51f467dea715e2b934daa.zip |
net-p2p/namecoin: fix for upcoming FORTIFY_SOURCE
On FreeBSD strlcat and strcpy exist so you should be using the
native libc versions instead of redefining your own.
FORTIFY_SOURCE depends on using the system headers so this change
fixes that case too.
PR: 202603
Submitted by: pfg, op
Approved by: milios@ccsys.com (maintainer)
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/namecoin/Makefile | 1 | ||||
-rw-r--r-- | net-p2p/namecoin/files/patch-src__strlcpy.h | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/net-p2p/namecoin/Makefile b/net-p2p/namecoin/Makefile index 10327a43dfe..dd494f990b7 100644 --- a/net-p2p/namecoin/Makefile +++ b/net-p2p/namecoin/Makefile @@ -3,6 +3,7 @@ PORTNAME= namecoin PORTVERSION= 0.3.80 +PORTREVISION= 1 DISTVERSIONPREFIX= nc PORTEPOCH= 1 CATEGORIES= net-p2p dns diff --git a/net-p2p/namecoin/files/patch-src__strlcpy.h b/net-p2p/namecoin/files/patch-src__strlcpy.h new file mode 100644 index 00000000000..9ad0cddbb5d --- /dev/null +++ b/net-p2p/namecoin/files/patch-src__strlcpy.h @@ -0,0 +1,23 @@ +--- net-p2p/namecoin/files/patch-src__strlcpy.h (revision 0) ++++ net-p2p/namecoin/files/patch-src__strlcpy.h (working copy) +@@ -0,0 +1,20 @@ ++--- src/strlcpy.h.orig 2015-08-24 00:28:33 UTC +++++ src/strlcpy.h ++@@ -15,6 +15,10 @@ ++ */ ++ #ifndef BITCOIN_STRLCPY_H ++ #define BITCOIN_STRLCPY_H +++ +++#if defined(__FreeBSD__) && (__FreeBSD_version >= 330000) +++#include <string.h> +++#else ++ /* ++ * Copy src to string dst of size siz. At most siz-1 characters ++ * will be copied. Always NUL terminates (unless siz == 0). ++@@ -83,4 +87,6 @@ inline size_t strlcat(char *dst, const c ++ ++ return(dlen + (s - src)); /* count does not include NUL */ ++ } +++#endif /* FreeBSD */ +++ ++ #endif |