diff src/getloadavg.c @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents c42ec1d1cded
children 8626e4521993
line wrap: on
line diff
--- a/src/getloadavg.c	Mon Aug 13 10:34:15 2007 +0200
+++ b/src/getloadavg.c	Mon Aug 13 10:35:03 2007 +0200
@@ -58,6 +58,7 @@
    __linux__			Linux: assumes /proc filesystem mounted.
    				Support from Michael K. Johnson.
    __NetBSD__			NetBSD: assumes /kern filesystem mounted.
+   __OpenBSD__			OpenBSD: dito.
 
    In addition, to avoid nesting many #ifdefs, we internally set
    LDAV_DONE to indicate that the load average has been computed.
@@ -621,7 +622,7 @@
     loadavg[elem] = load_ave[elem];
 #endif /* __linux__ */
 
-#if !defined (LDAV_DONE) && defined (__NetBSD__)
+#if !defined (LDAV_DONE) && defined (__NetBSD__) || defined (__OpenBSD__)
 #define LDAV_DONE
 #undef LOAD_AVE_TYPE
 
@@ -645,7 +646,7 @@
 
   for (elem = 0; elem < nelem; elem++)
     loadavg[elem] = (double) load_ave[elem] / (double) scale;
-#endif /* __NetBSD__ */
+#endif /* __NetBSD__ or __OpenBSD__ */
 
 #if !defined (LDAV_DONE) && defined (NeXT)
 #define LDAV_DONE