diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-09 17:54:25 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-09 17:54:25 +0100 |
commit | ea1bceb8cc849fbd8423ffe12a8e156611bc531f (patch) | |
tree | 434da3af857c88645029f7bd1ee7b7c00b8e0b1c /runtime/msg.c | |
parent | dcf3e763194fce727ac3050bf6d2adbeef983530 (diff) | |
parent | b6249c44616cd828c2d53506109b50afd2e61839 (diff) | |
download | rsyslog-ea1bceb8cc849fbd8423ffe12a8e156611bc531f.tar.gz rsyslog-ea1bceb8cc849fbd8423ffe12a8e156611bc531f.tar.bz2 rsyslog-ea1bceb8cc849fbd8423ffe12a8e156611bc531f.zip |
Merge branch 'v7-stable' into v7-stable-libnet-frag
Conflicts:
ChangeLog
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 7 |
1 files changed, 6 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 |