rsyslog/rsyslog-7.4.6-omelasticsearch-atomic-instructions-ppc.patch
Andreas Stieger 3288f86895 Accepting request 205784 from home:AndreasStieger:branches:Base:System
- fix ppc build, add patch from upstream to fix build on platforms
  without atomic instructions
  rsyslog-7.4.6-omelasticsearch-atomic-instructions-ppc.patch

  Implements [bnc#848574] comment #4

OBS-URL: https://build.opensuse.org/request/show/205784
OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=166
2013-11-04 20:34:08 +00:00

58 lines
2.9 KiB
Diff

From: Rainer Gerhards <rgerhards@adiscon.com>
Date: Fri, 18 Oct 2013 05:11:44 +0000 (+0200)
Subject: bugfix: omelasticsearch did not compile on platforms without atomic instructions
X-Git-Url: http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=16207e3d55ac6bb15af6d50791d2c7462816de57
References: http://git.adiscon.com/?p=rsyslog.git;a=commitdiff;h=16207e3d55ac6bb15af6d50791d2c7462816de57#patch2
Fixes build on ppc.
[ 249s] In file included from ../../runtime/prop.h:25:0,
[ 249s] from ../../runtime/glbl.h:35,
[ 249s] from ../../runtime/stream.h:70,
[ 249s] from ../../runtime/obj.h:48,
[ 249s] from ../../runtime/rsyslog.h:525,
[ 249s] from omelasticsearch.c:26:
[ 249s] omelasticsearch.c: In function 'curlPost':
[ 249s] omelasticsearch.c:611:39: error: 'mutHTTPReqFail' undeclared (first use in this function)
[ 249s] STATSCOUNTER_INC(indexHTTPReqFail, mutHTTPReqFail);
and similar
---
plugins/omelasticsearch/omelasticsearch.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: rsyslog-7.4.6/plugins/omelasticsearch/omelasticsearch.c
===================================================================
--- rsyslog-7.4.6.orig/plugins/omelasticsearch/omelasticsearch.c 2013-10-29 15:08:48.000000000 +0000
+++ rsyslog-7.4.6/plugins/omelasticsearch/omelasticsearch.c 2013-11-04 20:00:38.000000000 +0000
@@ -608,7 +608,7 @@ curlPost(instanceData *pData, uchar *mes
case CURLE_COULDNT_RESOLVE_PROXY:
case CURLE_COULDNT_CONNECT:
case CURLE_WRITE_ERROR:
- STATSCOUNTER_INC(indexHTTPReqFail, mutHTTPReqFail);
+ STATSCOUNTER_INC(indexHTTPReqFail, mutIndexHTTPReqFail);
indexHTTPFail += nmsgs;
DBGPRINTF("omelasticsearch: we are suspending ourselfs due "
"to failure %lld of curl_easy_perform()\n",
@@ -1001,16 +1001,16 @@ CODEmodInit_QueryRegCFSLineHdlr
/* support statistics gathering */
CHKiRet(statsobj.Construct(&indexStats));
CHKiRet(statsobj.SetName(indexStats, (uchar *)"omelasticsearch"));
- STATSCOUNTER_INIT(indexSubmit, mutCtrIndexSubmit);
+ STATSCOUNTER_INIT(indexSubmit, mutIndexSubmit);
CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"submitted",
ctrType_IntCtr, &indexSubmit));
- STATSCOUNTER_INIT(indexHTTPFail, mutCtrIndexHTTPFail);
+ STATSCOUNTER_INIT(indexHTTPFail, mutIndexHTTPFail);
CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.http",
ctrType_IntCtr, &indexHTTPFail));
- STATSCOUNTER_INIT(indexHTTPReqFail, mutCtrIndexHTTPReqFail);
+ STATSCOUNTER_INIT(indexHTTPReqFail, mutIndexHTTPReqFail);
CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.httprequests",
ctrType_IntCtr, &indexHTTPReqFail));
- STATSCOUNTER_INIT(indexESFail, mutCtrIndexESFail);
+ STATSCOUNTER_INIT(indexESFail, mutIndexESFail);
CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.es",
ctrType_IntCtr, &indexESFail));
CHKiRet(statsobj.ConstructFinalize(indexStats));