diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-09 16:01:32 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-09 16:01:32 +0100 |
commit | 2791bd82f5305c4b514ebf50e97de686961d9dd1 (patch) | |
tree | d8193715d8a2f4c6f8132bc85ff5790aefe1c386 /runtime/msg.c | |
parent | ae4f1c56d9497236023e7be8f2d1d8050aa41068 (diff) | |
parent | 8a344f0ba6938591dc91a5fc2218eaa89c6fecd6 (diff) | |
download | rsyslog-2791bd82f5305c4b514ebf50e97de686961d9dd1.tar.gz rsyslog-2791bd82f5305c4b514ebf50e97de686961d9dd1.tar.bz2 rsyslog-2791bd82f5305c4b514ebf50e97de686961d9dd1.zip |
Merge branch 'v7-stable'
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 cf72892e..37df5bd0 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> @@ -2964,7 +2966,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 |