🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Heiko W.Rupp Tue, 23 Jul 1996 00:00
Changes to INN FAQ Part part2/9: part2
#9574
Author: Heiko W.Rupp
Date: Tue, 23 Jul 1996 00:00
64 lines
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 !!

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads