You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
/* Compile-time symbols that this file uses:
AC_CHECK_FUNCS(pstat_getdynamic) in your
configure.in file.
FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist.
- KERNEL_FILE Pathname of the kernel to nlist.
+ KERNEL_FILE Name of the kernel file to nlist.
LDAV_CVT() Scale the load average from the kernel.
Returns a double.
LDAV_SYMBOL Name of kernel symbol giving load average.
# include <sys/dg_sys_info.h>
# endif
-# if defined (HAVE_FCNTL_H) || defined (_POSIX_VERSION)
-# include <fcntl.h>
-# else
-# include <sys/file.h>
-# endif
+# include <fcntl.h>
+
+# include "unistd-safer.h"
\f
/* Avoid static vars inside a function since in HPUX they dump as pure. */
if (!getloadavg_initialized)
{
# ifndef SUNOS_5
- channel = open ("/dev/kmem", 0);
+ channel = fd_safer (open ("/dev/kmem", O_RDONLY));
if (channel >= 0)
{
/* Set the channel to close on exec, so it does not