summaryrefslogtreecommitdiff
path: root/comms/kermit/patches/patch-ae
blob: dad5b49f79d0822501f835f53aa3b0323df84652 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ae,v 1.5 2005/12/18 23:15:43 joerg Exp $

--- ckucmd.c.orig	2005-12-18 22:57:18.000000000 +0000
+++ ckucmd.c
@@ -7128,7 +7128,12 @@ cmdconchk() {
     if (x == 0) x = conchk();
     if (x < 0) x = 0;
 #else  /* USE_FILE_CNT */
-#ifdef USE_FILE_R			/* FreeBSD, OpenBSD, etc */
+#if defined(__DragonFly__) && defined(feof_unlocked)
+    debug(F101,"cmdconchk stdin->_r","",((struct __FILE_public *)stdin)->_r);
+    x = ((struct __FILE_public *)stdin)->_r;
+    if (x == 0) x = conchk();
+    if (x < 0) x = 0;
+#elif defined(USE_FILE_R)			/* FreeBSD, OpenBSD, etc */
     debug(F101,"cmdconchk stdin->_r","",stdin->_r);
     x = stdin->_r;
     if (x == 0) x = conchk();