summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c7
-rw-r--r--runtime/net.c4
-rw-r--r--runtime/srutils.c3
3 files changed, 13 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 10605ba4..32a02424 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -36,7 +36,9 @@
#include <assert.h>
#include <ctype.h>
#include <sys/socket.h>
+#if HAVE_SYSINFO_UPTIME
#include <sys/sysinfo.h>
+#endif
#include <netdb.h>
#include <libestr.h>
#include <json/json.h>
@@ -2773,7 +2775,10 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
*pbMustBeFreed = 0;
break;
case PROP_SYS_UPTIME:
-# ifndef HAVE_SYSINFO
+# ifndef HAVE_SYSINFO_UPTIME
+ /* An alternative on some systems (eg Solaris) is to scan
+ * /var/adm/utmpx for last boot time.
+ */
pRes = (uchar*) "UPTIME NOT available on this system";
*pbMustBeFreed = 0;
# else
diff --git a/runtime/net.c b/runtime/net.c
index dcf9cb52..1a8f2438 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -54,7 +54,11 @@
#include <fnmatch.h>
#include <fcntl.h>
#include <unistd.h>
+#if HAVE_GETIFADDRS
#include <ifaddrs.h>
+#else
+#include "compat/ifaddrs.h"
+#endif /* HAVE_GETIFADDRS */
#include <sys/types.h>
#include <arpa/inet.h>
diff --git a/runtime/srutils.c b/runtime/srutils.c
index f420c0f7..4ce6196a 100644
--- a/runtime/srutils.c
+++ b/runtime/srutils.c
@@ -92,6 +92,9 @@ syslogName_t syslogFacNames[] = {
#if defined(LOG_FTP)
{"ftp", LOG_FTP},
#endif
+#if defined(LOG_AUDIT)
+ {"audit", LOG_AUDIT},
+#endif
{"local0", LOG_LOCAL0},
{"local1", LOG_LOCAL1},
{"local2", LOG_LOCAL2},