pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/chat/swirc swirc: Fix building on NetBSD 9
details: https://anonhg.NetBSD.org/pkgsrc/rev/b005e0680fb8
branches: trunk
changeset: 385499:b005e0680fb8
user: nia <nia%pkgsrc.org@localhost>
date: Sun Sep 18 12:21:18 2022 +0000
description:
swirc: Fix building on NetBSD 9
diffstat:
chat/swirc/distinfo | 3 +-
chat/swirc/patches/patch-src_printtext.cpp | 36 ++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletions(-)
diffs (51 lines):
diff -r dd6e2f4283f6 -r b005e0680fb8 chat/swirc/distinfo
--- a/chat/swirc/distinfo Sun Sep 18 12:12:30 2022 +0000
+++ b/chat/swirc/distinfo Sun Sep 18 12:21:18 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2022/07/28 22:18:05 fcambus Exp $
+$NetBSD: distinfo,v 1.4 2022/09/18 12:21:18 nia Exp $
BLAKE2s (swirc-3.3.5.tgz) = 9723254acc50f0b8680c4f78bdef7934c1984a7b7fa91201360d4ee648862145
SHA512 (swirc-3.3.5.tgz) = 424b567709cd82aa84efb2623b52d4586077dab5e025c3dce8fae382a5de2a4531819b1f7fde353b84c462c7c7b6cac6142c7d807d05f534a7599d706237d4ee
Size (swirc-3.3.5.tgz) = 291300 bytes
+SHA1 (patch-src_printtext.cpp) = 476d813c9c4aff2c3d81920d66aa5baafddfaaaa
diff -r dd6e2f4283f6 -r b005e0680fb8 chat/swirc/patches/patch-src_printtext.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/swirc/patches/patch-src_printtext.cpp Sun Sep 18 12:21:18 2022 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_printtext.cpp,v 1.1 2022/09/18 12:21:18 nia Exp $
+
+Support iconv prototype on NetBSD 9 and earlier.
+
+--- src/printtext.cpp.orig 2022-07-28 13:19:25.000000000 +0000
++++ src/printtext.cpp
+@@ -39,6 +39,15 @@
+ #include <iconv.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
++
+ #include "assertAPI.h"
+ #include "atomicops.h"
+ #ifdef UNIT_TESTING
+@@ -1473,8 +1482,13 @@ get_buffer(const char *orig)
+ out[outbytes] = '\0';
+ out_p = addrof(out[0]);
+ errno = 0;
++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV) || defined(__sun)
++ if (iconv(cd, (const char **)&in, &inbytes, &out_p, &outbytes) == static_cast
++ <size_t>(-1)) {
++#else
+ if (iconv(cd, &in, &inbytes, &out_p, &outbytes) == static_cast
+ <size_t>(-1)) {
++#endif
+ free(orig_copy);
+ free(out);
+ (void) iconv_close(cd);
Home |
Main Index |
Thread Index |
Old Index