2014-10-08 16:36 GMT+02:00 ignasr <[email protected]>: > Hello, > > when trying to compile rsyslog 8.4.2: > > ======================================= > [root@rstest rsyslog-8.4.2]# make > make all-recursive > make[1]: Entering directory `/root/dl/rsyslog-8.4.2/rsyslog-8.4.2' > Making all in compat > make[2]: Entering directory `/root/dl/rsyslog-8.4.2/rsyslog-8.4.2/compat' > make[2]: Nothing to be done for `all'. > make[2]: Leaving directory `/root/dl/rsyslog-8.4.2/rsyslog-8.4.2/compat' > Making all in runtime > make[2]: Entering directory `/root/dl/rsyslog-8.4.2/rsyslog-8.4.2/runtime' > CC librsyslog_la-msg.lo > msg.c: In function ‘MsgSetPropsViaJSON’: > msg.c:4106: error: ‘for’ loop initial declarations are only allowed in C99 > mode > msg.c:4106: note: use option -std=c99 or -std=gnu99 to compile your code > make[2]: *** [librsyslog_la-msg.lo] Error 1 > make[2]: Leaving directory `/root/dl/rsyslog-8.4.2/rsyslog-8.4.2/runtime' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/root/dl/rsyslog-8.4.2/rsyslog-8.4.2' > make: *** [all] Error 2 > ======================================= > > My workaroung for this is adding -std=c99 to runtime/Makefile: > 298:CFLAGS = -g -O2 -std=c99 > > Is this a good solution, or should I do something else? > > The root cause of this problem is json-c, which has the for loop that is being complained about. As we do not know any better solution, we also use --std=c99. This problem seems to exist only with older versions of gcc.
Rainer > Thank you > ignasr > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com/professional-services/ > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad > of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you > DON'T LIKE THAT. _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

