I'm not sure how hard this is to compile under Linux.  I've seen
some patches (slackware/source) for INN but they weren't written
with portability in mind.  (e.g. would make the source Linux-specific)
Please if you compile this under Linux and can submit properly
#ifdef'd patches for Linux, please send them to me.

mmap() is supposedly fixed in kernel 1.3.25 and libc 5.2.x.
People with large feeds may still have problems and supposedly
1.3.37 may fix that.  HAVE_UNIX_DOMAIN DO is supposedly fixed too.
This is good, since setting it to DONT will lead to hanging
ctlinnd's.  Don't try using mmap() or unix domain sockets before 1.3.25.

Don't forget: In order to install INN you MUST remove or comment out
the 'nntp' entry from inetd.conf and HUP inetd.

For now this is the only patch I could find in my quick look
around the net.  This came out of ftp.cdrom.com/linux/slackware/source/n/inn.
No promises.  Looking at the change, I don't recommend applying it.


 ##
--- include/clibrary.h
+++ include/clibrary.h	1994/05/21 21:57:57
@@ -12,6 +12,8 @@
 #include <vfork.h>
 #endif	/* defined(DO_HAVE_VFORK) */
 
+#include <sys/time.h>
+
     /* Generic pointer, used by memcpy, malloc, etc. */
     /* =()<typedef @<POINTER>@ *POINTER;>()= */
 typedef char *POINTER;
--- include/inndcomm.h
+++ include/inndcomm.h	1994/05/21 21:57:57
@@ -4,6 +4,12 @@
 **  running.
 */
 
+#if !defined(DO_HAVE_UNIX_DOMAIN)
+typedef short ICC_MSGLENTYPE;	/* Length code to prefix commands to
+				** the server.
+				*/
+#endif
+
 #define SC_SEP		'\001'
 #define SC_MAXFIELDS	6
 
--- innd/cc.c
+++ innd/cc.c	1994/05/21 21:57:57
@@ -1314,6 +1314,7 @@
     struct sockaddr_un	client;
 #else
     int			written;
+    ICC_MSGLENTYPE	bufflen;
 #endif	/* defined(DO_HAVE_UNIX_DOMAIN) */
     int			i;
     char		buff[BUFSIZ + 2];
@@ -1329,7 +1330,21 @@
     }
 
     /* Get the message. */
+#if !defined(DO_HAVE_UNIX_DOMAIN)
+    i = RECVorREAD(CCchan->fd, (char *) &bufflen, sizeof(bufflen));
+    if (i != sizeof(bufflen) 
+	|| bufflen < 1 || bufflen >= (sizeof buff - 1)) {
+	syslog(L_ERROR, "%s cant recv CCreader length %m", LogName);
+	return;
+    }
+    i = RECVorREAD(CCchan->fd, buff, bufflen);
+    if (i > 0 && i != bufflen) {
+	syslog(L_ERROR, "%s cant recv CCreader data %m", LogName);
+	return;
+    }
+#else
     i = RECVorREAD(CCchan->fd, buff, sizeof buff - 1);
+#endif
     if (i < 0) {
 	syslog(L_ERROR, "%s cant recv CCreader %m", LogName);
 	return;
--- lib/inndcomm.c
+++ lib/inndcomm.c	1994/05/21 21:57:57
@@ -169,7 +169,18 @@
 
 /*
 **  Send an arbitrary command to the server.
+**  Note that for those systems without Unix Domain Sockets,
+**  the command format is different. There is a two byte
+**  length code on the front of the message. This is a
+**  direct mapped integer. Note that sending and receiving
+**  architectures *must* be the same as we are on the same
+**  machine.
 */
+#if defined(DO_HAVE_UNIX_DOMAIN)
+#define BUFF_OFFSET 0
+#else
+#define BUFF_OFFSET sizeof(ICC_MSGLENTYPE)
+#endif
 int
 ICCcommand(cmd, argv, replyp)
     char		cmd;
@@ -203,7 +214,7 @@
 	bufsiz += 1 + strlen(p);
     if (bufsiz < MIN_BUFFER_SIZE)
 	bufsiz = MIN_BUFFER_SIZE;
-    buff = malloc((unsigned int)bufsiz);
+    buff = malloc((unsigned int)bufsiz + BUFF_OFFSET);
     if (buff == NULL) {
 	ICCfailure = "malloc";
 	return -1;
@@ -211,6 +222,8 @@
     if (replyp)
 	*replyp = NULL;
 
+    buff += BUFF_OFFSET;	/* Advance to leave space for length */
+
     /* Format the message. */
     (void)sprintf(buff, "%s%c%c", ICCsockname, SC_SEP, cmd);
     for (p = buff + strlen(buff), i = 0; (q = argv[i]) != NULL; i++) {
@@ -221,6 +234,10 @@
     /* Send message. */
     ICCfailure = NULL;
     len = p - buff;
+
+    buff -= BUFF_OFFSET;	/* Not strictly required - could be inside
+				 * #else clause below */
+
 #if	defined(DO_HAVE_UNIX_DOMAIN)
     if (sendto(ICCfd, buff, len, 0,
 	    (struct sockaddr *)&ICCserv, AF_UNIX_SOCKSIZE(ICCserv)) < 0) {
@@ -234,6 +251,8 @@
 	ICCfailure = "open";
 	return -1;
     }
+    *(ICC_MSGLENTYPE *) buff = len;
+    len += BUFF_OFFSET;
     if (write(fd, buff, len) != len) {
 	i = errno;
 	DISPOSE(buff);
