Hi,

We have just released 7.6.6 of the v7-stable branch.


I've got a build error in 7.6.6:


make[4]: Entering directory `/usr/src/rsyslog-7.6.6/grammar'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../runtime -I.. -I../grammar -I/usr/include/json-c -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -MT libgrammar_la-grammar.lo -MD -MP -MF .deps/libgrammar_la-grammar.Tpo -c -o libgrammar_la-grammar.lo `test -f 'grammar.c' || echo './'`grammar.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../runtime -I.. -I../grammar -I/usr/include/json-c -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -MT libgrammar_la-grammar.lo -MD -MP -MF .deps/libgrammar_la-grammar.Tpo -c grammar.c -fPIC -DPIC -o .libs/libgrammar_la-grammar.o
mv -f .deps/libgrammar_la-grammar.Tpo .deps/libgrammar_la-grammar.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../runtime -I.. -I../grammar -I/usr/include/json-c -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -MT libgrammar_la-lexer.lo -MD -MP -MF .deps/libgrammar_la-lexer.Tpo -c -o libgrammar_la-lexer.lo `test -f 'lexer.c' || echo './'`lexer.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../runtime -I.. -I../grammar -I/usr/include/json-c -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -MT libgrammar_la-lexer.lo -MD -MP -MF .deps/libgrammar_la-lexer.Tpo -c lexer.c -fPIC -DPIC -o .libs/libgrammar_la-lexer.o
lexer.l:34: error: conflicting types for 'strdup'
make[4]: *** [libgrammar_la-lexer.lo] Error 1
make[4]: Leaving directory `/usr/src/rsyslog-7.6.6/grammar'


offending line seems line 1462 in lexer.c:
extern char *strdup(char*); /* somehow we do not get this from string.h... */

If I drop that line build is OK.
My string.h does have strdup, but defined as: extern char *strdup(__const char*);
Following patch also works:

diff --git a/grammar/lexer.l b/grammar/lexer.l
index 796815c..4da4b8d 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -31,7 +31,7 @@
 %{
 #include "config.h"
 #include "parserif.h"
-extern char *strdup(char*); /* somehow we do not get this from string.h... */ +extern char *strdup(__const char*); /* somehow we may not get this from string.h... */
 %}

 %option noyywrap nodefault case-insensitive yylineno


But I do not know if that matches all variants of strdup that may be out there.


FWIW 7.6.3 builds OK, have not tried 7.6.4/5



Olaf
_______________________________________________
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.

Reply via email to