summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorgutteridge <gutteridge@pkgsrc.org>2020-07-30 00:02:10 +0000
committergutteridge <gutteridge@pkgsrc.org>2020-07-30 00:02:10 +0000
commitf8bf58417234e6206f0708ce488f6c5ffd0e5256 (patch)
tree803896c3a8d88953c6250997ef601dfd24bd6f97 /comms
parente3696b131ea446417e4abb20cfd9e4f8d5f0c4d9 (diff)
downloadpkgsrc-f8bf58417234e6206f0708ce488f6c5ffd0e5256.tar.gz
kermit: fix compilation on Linux with glibc >= 2.28
Fix taken from the upstream project's 9.0.305 Alpha.01 release, noted to be a temporary workaround. (Separately, from how I read the change log, there has been no stable 9.0 release since 9.0.302.) Tested on Debian 9.13 (which has an older version of glibc which wouldn't reproduce the issue) and Fedora 31 & 32. (This issue was reported on pkgsrc-users back in July 2019 by Pierre Dupond, and I'd provided a workaround for it in that email chain, but I'd never actually committed anything to pkgsrc.)
Diffstat (limited to 'comms')
-rw-r--r--comms/kermit/distinfo4
-rw-r--r--comms/kermit/patches/patch-ae31
2 files changed, 29 insertions, 6 deletions
diff --git a/comms/kermit/distinfo b/comms/kermit/distinfo
index 2bad0ffa368..3b94f2fa1b6 100644
--- a/comms/kermit/distinfo
+++ b/comms/kermit/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2020/04/09 11:55:02 rhialto Exp $
+$NetBSD: distinfo,v 1.27 2020/07/30 00:02:10 gutteridge Exp $
SHA1 (kermit-9.0.302/cku302.tar.gz) = d04c8b5600bc0bb0f163d294881f7a5a0d4395b5
RMD160 (kermit-9.0.302/cku302.tar.gz) = ef3a71b5a42868c80408ac09662d00b71da0b0c8
@@ -8,7 +8,7 @@ SHA1 (patch-aa) = fd3a613ce3cd3755a2e3b8baf33df33593713024
SHA1 (patch-ab) = 280bfca4d44630bc9ec4a9331b650b81c7f80774
SHA1 (patch-ac) = 62cc9e92f2413a42312d9f6d168ee85664b6aab9
SHA1 (patch-ad) = 414f61c19185e4a82a8326121c2d9dacfba48077
-SHA1 (patch-ae) = 53384e9cbfe13559d69ab95215a4575f726dc325
+SHA1 (patch-ae) = 8939f52e9c15043012c29a8082f1e08baafac2e1
SHA1 (patch-af) = 2a09f9f933d3c1e6860983d8138ac61f33306ef7
SHA1 (patch-ag) = cae37680ea5af85f4d2c774fe230f73a1f0be48c
SHA1 (patch-ah) = 5b2098dfd57f8bd4d107acafaabe1a2c9b97d037
diff --git a/comms/kermit/patches/patch-ae b/comms/kermit/patches/patch-ae
index 9148914da6d..3ac00986624 100644
--- a/comms/kermit/patches/patch-ae
+++ b/comms/kermit/patches/patch-ae
@@ -1,8 +1,23 @@
-$NetBSD: patch-ae,v 1.6 2011/08/25 13:46:28 hans Exp $
+$NetBSD: patch-ae,v 1.7 2020/07/30 00:02:10 gutteridge Exp $
---- ckucmd.c.orig 2005-12-18 22:57:18.000000000 +0000
+Portability fixes for DragonFly, SunOS, and Linux.
+
+--- ckucmd.c.orig 2011-07-14 12:14:37.000000000 +0000
+++ ckucmd.c
-@@ -7115,8 +7115,19 @@ cmdconchk() {
+@@ -7370,7 +7370,11 @@ cmdconchk() {
+
+ /* Here we must look inside the stdin buffer - highly platform dependent */
+
+-#ifdef _IO_file_flags /* Linux */
++#ifdef __FILE_defined /* glibc 2.28 1 Aug 2018 */
++ x = (int) ((stdin->_IO_read_end) - (stdin->_IO_read_ptr));
++ debug(F101,"cmdconchk __FILE_defined","",x);
++#else /* __FILE_defined */
++#ifdef _IO_file_flags /* Linux (glibc 2.28 removed this symbol */
+ x = (int) ((stdin->_IO_read_end) - (stdin->_IO_read_ptr));
+ debug(F101,"cmdconchk _IO_file_flags","",x);
+ #else /* _IO_file_flags */
+@@ -7382,8 +7386,19 @@ cmdconchk() {
#ifdef NOARROWKEYS
debug(F101,"cmdconchk NOARROWKEYS x","",0);
#else
@@ -22,7 +37,7 @@ $NetBSD: patch-ae,v 1.6 2011/08/25 13:46:28 hans Exp $
#endif /* NOARROWKEYS */
#endif /* VMS */
if (x == 0) x = conchk();
-@@ -7128,7 +7128,12 @@ cmdconchk() {
+@@ -7395,7 +7410,12 @@ cmdconchk() {
if (x == 0) x = conchk();
if (x < 0) x = 0;
#else /* USE_FILE_CNT */
@@ -36,3 +51,11 @@ $NetBSD: patch-ae,v 1.6 2011/08/25 13:46:28 hans Exp $
debug(F101,"cmdconchk stdin->_r","",stdin->_r);
x = stdin->_r;
if (x == 0) x = conchk();
+@@ -7407,6 +7427,7 @@ cmdconchk() {
+ #endif /* USE_FILE__CNT */
+ #endif /* USE_FILE_CNT */
+ #endif /* _IO_file_flags */
++#endif /* __FILE_defined */
+ #endif /* CMD_CONINC */
+ #endif /* OS2 */
+ return(x + y);