1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/net/generic-nqs/files/patch-ag
Yoshio MITA b4a37e672d Applied proposed two PRs.
PR:		ports/29616, ports/30963
Approved by:	the maintainer
2001-10-10 11:45:08 +00:00

32 lines
784 B
Plaintext

--- Source-Tree/loaddaemon/all-systems/loaddaemon.c.orig Thu Aug 2 01:18:37 2001
+++ Source-Tree/loaddaemon/all-systems/loaddaemon.c Fri Aug 3 16:59:53 2001
@@ -539,6 +539,20 @@
}
#endif /* HPUX */
#if IS_DECOSF | IS_BSD
+#if BSD4_4
+static
+void calcloadavg(double load[3])
+{
+ double avenrun[3];
+ int i;
+ if (getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0]))) {
+ printf("getloadavg goofed\n");
+ }
+ for (i = 0; i < 3; i++) {
+ load[i] = avenrun[i];
+ }
+}
+#else
struct nlist nl[] = {
#define unixpath "/vmunix"
{ "_avenrun" },
@@ -570,6 +584,7 @@
for (i = 0; i < 3; i++)
load[i] = ((double) avenrun[i]) / (double) 1024.;
}
+#endif /* BSD4_4 */
#endif /* DECOSF or Sun (BSD43) */
#if IS_SOLARIS