Menu

#6 compile error in signals.c if _DEBUG_ defined

open
nobody
None
5
2009-11-05
2009-11-05
Neil
No

I tried compiling the keepalived-1.1.19 release today on a gentoo box, with the _DEBUG_ flag set. It has a compile error in signals.c:

signals.c: In function 'signal_handler':
signals.c:69: warning: implicit declaration of function 'syslog'
signals.c:69: error: 'LOG_DEBUG' undeclared (first use in this function)
signals.c:69: error: (Each undeclared identifier is reported only once
signals.c:69: error: for each function it appears in.)
make[1]: *** [signals.o] Error 1

The root cause seems to be in utils.h: the DBG macro references syslog and LOG_DEBUG, but
<syslog.h> is never included.

Adding a #include <syslog.h> right after the #ifdef _DEBUG_ line fixed the compile issues for me.

Discussion


Log in to post a comment.