diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-09 12:22:41 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-09 12:22:41 +0100 |
commit | b69e45aaaa4dca1d338396a2d2023608c947c0e1 (patch) | |
tree | 438575aac59ad9e68e2481a1bfb27a1e1375191f /runtime/msg.c | |
parent | 0df3ec66bd4d5872025b65d84c2e86a9c4bdc760 (diff) | |
parent | eb7cf12ba8adcff0f1811f0393c6b73160ebebd0 (diff) | |
download | rsyslog-b69e45aaaa4dca1d338396a2d2023608c947c0e1.tar.gz rsyslog-b69e45aaaa4dca1d338396a2d2023608c947c0e1.tar.bz2 rsyslog-b69e45aaaa4dca1d338396a2d2023608c947c0e1.zip |
Merge branch 'v7-stable'
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index de0ca553..5b6392b2 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -45,7 +45,9 @@ #if HAVE_MALLOC_H # include <malloc.h> #endif -#include <uuid/uuid.h> +#ifdef USE_LIBUUID + #include <uuid/uuid.h> +#endif #include "rsyslog.h" #include "srUtils.h" #include "stringbuf.h" @@ -559,8 +561,10 @@ propNameStrToID(uchar *pName, propid_t *pPropID) *pPropID = PROP_MSGID; } else if(!strcmp((char*) pName, "parsesuccess")) { *pPropID = PROP_PARSESUCCESS; +#ifdef USE_LIBUUID } else if(!strcmp((char*) pName, "uuid")) { *pPropID = PROP_UUID; +#endif /* here start system properties (those, that do not relate to the message itself */ } else if(!strcmp((char*) pName, "$now")) { *pPropID = PROP_SYS_NOW; @@ -1450,6 +1454,7 @@ char *getProtocolVersionString(msg_t *pM) return(pM->iProtocolVersion ? "1" : "0"); } +#ifdef USE_LIBUUID /* note: libuuid seems not to be thread-safe, so we need * to get some safeguards in place. */ @@ -1504,6 +1509,7 @@ void getUUID(msg_t *pM, uchar **pBuf, int *piLen) } dbgprintf("[getUUID] END\n"); } +#endif void getRawMsg(msg_t *pM, uchar **pBuf, int *piLen) @@ -2970,9 +2976,11 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, case PROP_MSGID: pRes = (uchar*)getMSGID(pMsg); break; +#ifdef USE_LIBUUID case PROP_UUID: getUUID(pMsg, &pRes, &bufLen); break; +#endif case PROP_PARSESUCCESS: pRes = (uchar*)getParseSuccess(pMsg); break; |