summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2019-10-24 22:28:46 +0000
committerkamil <kamil@pkgsrc.org>2019-10-24 22:28:46 +0000
commit44ad56dcb822fa63428725dc370ebe3da3fcd604 (patch)
treed058d67f8fc623aaaed1e3f9619d55ed36b592f2 /net
parentf8d3781dba995e08d796a9b3842ce570bde279bf (diff)
downloadpkgsrc-44ad56dcb822fa63428725dc370ebe3da3fcd604.tar.gz
ocsync: Fix build on NetBSD 9.99.17
Adapt the local patch for the POSIX iconv(3) API change in new NetBSD.
Diffstat (limited to 'net')
-rw-r--r--net/ocsync/distinfo4
-rw-r--r--net/ocsync/patches/patch-src_std_c__string.c26
2 files changed, 23 insertions, 7 deletions
diff --git a/net/ocsync/distinfo b/net/ocsync/distinfo
index db9216939ba..019a3f0fcfa 100644
--- a/net/ocsync/distinfo
+++ b/net/ocsync/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2017/08/19 00:23:36 jlam Exp $
+$NetBSD: distinfo,v 1.4 2019/10/24 22:28:46 kamil Exp $
SHA1 (ocsync-0.90.4.tar.bz2) = d53a64177addc9fcdd831a0a78786eca25b2588a
RMD160 (ocsync-0.90.4.tar.bz2) = b6208a9c0ae452f16f0ced32c1b5635df06d3b99
@@ -6,4 +6,4 @@ SHA512 (ocsync-0.90.4.tar.bz2) = 74bf6b083ae4d4c09e3915d777d916a04ebb19aefb21a5a
Size (ocsync-0.90.4.tar.bz2) = 4630698 bytes
SHA1 (patch-cmake_Modules_DefineInstallationPaths.cmake) = 1ce32ae21fe331d1ebf5bd5a5941e405a7eb4b06
SHA1 (patch-config_CMakeLists.txt) = b387f38a79d9f85e3f67060a2cb689bb13dd1c28
-SHA1 (patch-src_std_c__string.c) = 65927e8f7c222edfde66136a331ae81b0f4fcd4c
+SHA1 (patch-src_std_c__string.c) = 4f94ae5559fd0c19b11f3bcd751b5de89ad615a4
diff --git a/net/ocsync/patches/patch-src_std_c__string.c b/net/ocsync/patches/patch-src_std_c__string.c
index 3edc36cb00e..35c40176402 100644
--- a/net/ocsync/patches/patch-src_std_c__string.c
+++ b/net/ocsync/patches/patch-src_std_c__string.c
@@ -1,17 +1,33 @@
-$NetBSD: patch-src_std_c__string.c,v 1.1 2013/11/22 12:01:13 ryoon Exp $
+$NetBSD: patch-src_std_c__string.c,v 1.2 2019/10/24 22:28:46 kamil Exp $
* For NetBSD iconv(3), this should be fixed for GNU iconv and NetBSD case.
--- src/std/c_string.c.orig 2013-10-18 13:11:09.000000000 +0000
+++ src/std/c_string.c
-@@ -83,7 +83,11 @@ enum iconv_direction { iconv_from_native
+@@ -40,6 +40,15 @@
+ #include <windows.h>
+ #endif
+
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#if __NetBSD_Prereq__(9,99,17)
++#define NETBSD_POSIX_ICONV 1
++#else
++#define NETBSD_POSIX_ICONV 0
++#endif
++#endif
++
+ #ifdef WITH_ICONV
+ #include <iconv.h>
+
+@@ -83,7 +92,11 @@ enum iconv_direction { iconv_from_native
static char *c_iconv(const char* str, enum iconv_direction dir)
{
-+#if !defined(__NetBSD__)
- char *in = (char*)str;
-+#else
++#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV
+ const char *in = (char*)str;
++#else
+ char *in = (char*)str;
+#endif
size_t size;
size_t outsize;