Article View: news.software.nntp
Article #9574Changes to INN FAQ Part part2/9: part2
From: Heiko W.Rupp
Date: Tue, 23 Jul 1996 00:00
Date: Tue, 23 Jul 1996 00:00
64 lines
2284 bytes
2284 bytes
--- part2 1996/07/09 21:09:14 2.15
+++ part2 1996/07/23 14:14:51
@@ -473,6 +473,54 @@
(from Jim Kerr <jak7@opsirm1.em.cdc.gov>)
+------
+
+Linux 2.x complains at compiling:
+
+gcc -O -o nnrpd article.o group.o commands.o misc.o newnews.o nnrpd.o
+post.o loadave.o ../libinn.a
+loadave.o(.text+0x3b): undefined reference to `nlist'
+
+Apply this patch (with some fuzz ... ) from
+coneill@premier1.premier.net (Clayton O'Neill) :
+
+--- /usr/local/news/INN/nnrpd/loadave.c Fri Jan 29 10:51:58 1993
++++ loadave.c Wed Jul 17 15:36:30 1996
+@@ -1,8 +1,28 @@
+-/* $Revision: 1.3 $
++/* $Revision: 1.4 $
+ **
+ */
+ #include "nnrpd.h"
+ #if NNRP_LOADLIMIT > 0
++#ifdef linux
++
++/*
++** Get the current load average as an integer.
++*/
++int
++GetLoadAverage()
++{
++ FILE *ProcLoadAve;
++ float load;
++
++ if ((ProcLoadAve=fopen("/proc/loadavg", "r"))==NULL)
++ return -1;
++ if (fscanf(ProcLoadAve,"%f", &load)!=1)
++ return -1;
++ fclose(ProcLoadAve);
++ return (int)(load+0.5);
++}
++
++#else
+ #include <nlist.h>
+
+------
+
+In some newer versions of Linux, nnrpd seems to seg fault. Reason is
+the size of fd_set (1024 bit), but the macros FD_??? operate on
+256bit). This happens if HAVE_UNISTD is set to DONT, so set it to DO.
+If it still happens, then include <sys/time.h> at the top of include/clibrary.h
------------------------------
Subject: A/UX 3.0 (Macintosh) tips
--
Heiko W.Rupp hwr@pilhuhn.de
INN FAQ can be found in ftp://ftp.xlink.net/pub/news/docs/
Stoppt den Kinderwahnsinn !! -- Esst nur deutsche Kinder !!
Technical Details
Message-ID:
<diff.faq.p2_838131649@pilhuhn.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <diff.faq.p2_838131649@pilhuhn.de> Subject: Changes to INN FAQ Part part2/9: part2 Date: Tue, 23 Jul 1996 00:00:00 +0000 From: hwr@pilhuhn.de (Heiko W.Rupp) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 169662887 Supersedes: <diff.faq.p2_837551304@pilhuhn.de> Followup-to: news.software.nntp Organization: The Home Of The Pilhuhn Newsgroups: news.software.nntp,news.software.b