- Add a patch to use getloadavg(3) instead of nlist and kernel sysmbols

- bumped PORTREVISION
This commit is contained in:
Dirk Meyer 2002-01-25 06:41:19 +00:00
parent 8e47a4aba8
commit dbcad19a4c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=53704
2 changed files with 37 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= nntp
PORTVERSION= 1.5.12.2
PORTREVISION= 1
CATEGORIES= news
MASTER_SITES= ftp://ftp.academ.com/pub/nntp/server/
DISTNAME= ${PORTNAME}.${PORTVERSION}

View file

@ -0,0 +1,36 @@
--- server/misc.c.orig Tue Jan 9 08:28:04 1996
+++ server/misc.c Fri Jan 25 06:16:44 2002
@@ -965,6 +965,27 @@
** none.
*/
+
+#if defined(BSD_44)
+#include <stdlib.h>
+
+int
+getla( void )
+{
+ double avenrun[3];
+ int rc;
+
+ rc = getloadavg( avenrun, 1 );
+ if ( rc == -1 )
+ return 1;
+# ifdef FSCALE
+ return ((int) (avenrun[0] + FSCALE/2) >> FSHIFT);
+# else
+ return ((int) (avenrun[0] + 0.5));
+# endif
+}
+
+#else
#if defined(USG) && !defined(SVR4)
int
getla()
@@ -1058,4 +1079,5 @@
# endif
}
#endif
+#endif /* BSD_44 */
#endif /* LOAD */