From 8b5f57a2c6b99944d2de885a1f7a303bdee0af48 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 9 Nov 2012 08:52:27 +0100 Subject: 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. --- runtime/msg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'runtime/msg.c') 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 #endif -#include +#ifdef USE_LIBUUID + #include +#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; -- cgit v1.2.3