From 49962904edda2852f4eaf6ddf9bfab0319f42c88 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sun, 3 Jun 2007 23:04:24 +0000 Subject: [PATCH] OpenBSD tweaks --- src/sigar.c | 8 ++++++-- src/sigar_format.c | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/sigar.c b/src/sigar.c index 756da7dc..cff3455e 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -24,6 +24,9 @@ #include #include #endif +#ifdef __OpenBSD__ +#include +#endif #include "sigar.h" #include "sigar_private.h" @@ -939,7 +942,7 @@ static char *getpass(const char *prompt) # endif #endif -#if defined(__FreeBSD__) || defined(DARWIN) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(DARWIN) # define ut_user ut_name #endif @@ -1243,7 +1246,8 @@ int sigar_resource_limit_get(sigar_t *sigar, } #endif -#if !defined(WIN32) && !defined(DARWIN) && !defined(__FreeBSD__) && !defined(NETWARE) +#if !defined(WIN32) && !defined(NETWARE) && \ + !defined(DARWIN) && !defined(__FreeBSD__) && !defined(__OpenBSD__) /* XXX: prolly will be moving these stuffs into os_net.c */ #include diff --git a/src/sigar_format.c b/src/sigar_format.c index 933a5539..f0eb00d6 100644 --- a/src/sigar_format.c +++ b/src/sigar_format.c @@ -28,6 +28,9 @@ #ifndef WIN32 #include +#ifdef __OpenBSD__ +#include +#endif #include #include