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.)
This commit is contained in:
parent
d46bc12916
commit
a65af58b39
2 changed files with 29 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue