Source: rsyslog Version: 8.29.0-1 Severity: serious Tags: sid buster patch Hi,
rsyslog FTBFS on mips, mipsel and various ports architectures with the error: > In file included from ../../runtime/prop.h:25:0, > from ../../runtime/glbl.h:38, > from ../../runtime/stream.h:73, > from ../../runtime/obj.h:48, > from ../../runtime/rsyslog.h:634, > from imptcp.c:61: > imptcp.c: In function 'AcceptConnReq': > imptcp.c:831:39: error: 'pThis' undeclared (first use in this function) > STATSCOUNTER_INC(pLstn->ctrSessOpen, pThis->pLstn->mutCtrSessOpen); > ^ > ../../runtime/atomic.h:206:22: note: in definition of macro > 'ATOMIC_INC_uint64' > pthread_mutex_lock(phlpmut); \ > ^~~~~~~ > imptcp.c:831:2: note: in expansion of macro 'STATSCOUNTER_INC' > STATSCOUNTER_INC(pLstn->ctrSessOpen, pThis->pLstn->mutCtrSessOpen); > ^~~~~~~~~~~~~~~~ > imptcp.c:831:39: note: each undeclared identifier is reported only once for > each function it appears in > STATSCOUNTER_INC(pLstn->ctrSessOpen, pThis->pLstn->mutCtrSessOpen); > ^ > ../../runtime/atomic.h:206:22: note: in definition of macro > 'ATOMIC_INC_uint64' > pthread_mutex_lock(phlpmut); \ > ^~~~~~~ > imptcp.c:831:2: note: in expansion of macro 'STATSCOUNTER_INC' > STATSCOUNTER_INC(pLstn->ctrSessOpen, pThis->pLstn->mutCtrSessOpen); > ^~~~~~~~~~~~~~~~ As the error suggests, pThis is not declared in that function. The code is only used on architectures which do not have 64-bit atomics which is why it only fails on some architectures. There is an upstream pull request to fix this: https://github.com/rsyslog/rsyslog/pull/1725 I've also attached the patch from that PR which should fix this. Thanks, James
From 2ea84c47b208214370034500f0aab19fe93cce7f Mon Sep 17 00:00:00 2001 From: Pete Nelson <pete.nel...@unitedlex.com> Date: Wed, 16 Aug 2017 17:19:33 -0400 Subject: [PATCH] correct paste oversight on mutex arg Remove the 'pThis->' from the second argument to STATSCOUNTER_INC macro. This only affects architectures without atomic uint64 actions, like aarm64. Others do not use the mut argument, and it gets compiled out. --- plugins/imptcp/imptcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index c373c17e6..ab2a17e5b 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -828,7 +828,7 @@ AcceptConnReq(ptcplstn_t *pLstn, int *newSock, prop_t **peerName, prop_t **peerI LogMsg(0, RS_RET_NO_ERRCODE, LOG_INFO, "imptcp: connection established with host: %s", propGetSzStr(*peerName)); } - STATSCOUNTER_INC(pLstn->ctrSessOpen, pThis->pLstn->mutCtrSessOpen); + STATSCOUNTER_INC(pLstn->ctrSessOpen, pLstn->mutCtrSessOpen); *newSock = iNewSock; finalize_it: @@ -837,7 +837,7 @@ AcceptConnReq(ptcplstn_t *pLstn, int *newSock, prop_t **peerName, prop_t **peerI if(iRet != RS_RET_NO_MORE_DATA && pLstn->pSrv->bEmitMsgOnOpen) { LogError(0, NO_ERRCODE, "imptcp: connection could not be established with host: %s", propGetSzStr(*peerName)); } - STATSCOUNTER_INC(pLstn->ctrSessOpenErr, pThis->pLstn->mutCtrSessOpenErr); + STATSCOUNTER_INC(pLstn->ctrSessOpenErr, pLstn->mutCtrSessOpenErr); /* the close may be redundant, but that doesn't hurt... */ if(iNewSock != -1) close(iNewSock);
signature.asc
Description: OpenPGP digital signature