summaryrefslogtreecommitdiff
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-03-05 17:35:26 +0100
committerMichael Biebl <biebl@debian.org>2013-03-05 17:35:26 +0100
commitac1a840d0afd724fa614eed5d64112a9ecf097f8 (patch)
tree29fc7cd1a00820ae3bda8e5b08e32da89c055e60 /runtime/msg.c
parent3793efd744861415cbb0e10df6ac9eab7b21e78e (diff)
downloadrsyslog-ac1a840d0afd724fa614eed5d64112a9ecf097f8.tar.gz
Imported Upstream version 7.2.6upstream/7.2.6
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 10605ba..32a0242 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