diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-09 08:52:27 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-09 08:52:27 +0100 |
commit | 8b5f57a2c6b99944d2de885a1f7a303bdee0af48 (patch) | |
tree | 7404edf73db6c0eed176bbe6ed286295b3ac284a /runtime/msg.c | |
parent | 7d4c4340510f1d1207da58812649a06daaff8e6f (diff) | |
download | rsyslog-8b5f57a2c6b99944d2de885a1f7a303bdee0af48.tar.gz rsyslog-8b5f57a2c6b99944d2de885a1f7a303bdee0af48.tar.bz2 rsyslog-8b5f57a2c6b99944d2de885a1f7a303bdee0af48.zip |
enabled to build without libuuid, at loss of uuid functionality
this enables smoother builds on older systems that do not support
libuuid. Loss of functionality should usually not matter too much as
uuid support has only recently been added and is very seldom used.
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 d874178b..1318de22 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" @@ -547,8 +549,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; @@ -1264,6 +1268,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. */ @@ -1318,6 +1323,7 @@ void getUUID(msg_t *pM, uchar **pBuf, int *piLen) } dbgprintf("[getUUID] END\n"); } +#endif void getRawMsg(msg_t *pM, uchar **pBuf, int *piLen) @@ -2796,9 +2802,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; |