Add support for building tsyslogd and syslog_tst again

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-10-22 16:41:52 +02:00
parent d0360f47ed
commit 1004498697
4 changed files with 12 additions and 1 deletions

2
src/.gitignore vendored
View File

@ -2,3 +2,5 @@
klogd
logger
syslogd
syslog_tst
tsyslogd

View File

@ -18,6 +18,7 @@
bin_PROGRAMS = logger
sbin_PROGRAMS = syslogd klogd
noinst_PROGRAMS = tsyslogd syslog_tst
AM_CFLAGS = -W -Wall -Wextra
AM_CFLAGS += -Wno-unused-result -Wno-unused-parameter
@ -34,3 +35,9 @@ klogd_CPPFLAGS = -DSYSV -DFSSTND -DALLOW_KERNEL_LOGGING \
logger_SOURCES = logger.c
logger_CPPFLAGS = -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
tsyslogd_SOURCES = syslogd.c pidfile.c pidfile.h
tsyslogd_CPPFLAGS = -DSYSV -DFSSTND -DSYSLOG_INET -DINET6 -DNO_SCCS -DSYSLOG_UNIXAF \
-D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DTESTING
syslog_tst_SOURCES = syslog_tst.c

View File

@ -23,7 +23,7 @@
int main(int argc, char *argv[])
{
char *nl,
char *nl;
char bufr[512];
int logged = 0;

View File

@ -1187,6 +1187,7 @@ int main(int argc, char *argv[])
restart = 0;
logit("\nReceived SIGHUP, reloading syslogd.\n");
init();
#ifndef TESTING
if (check_pid(PidFile)) {
if (touch_pid(PidFile))
logerror("Not possible to touch pidfile");
@ -1194,6 +1195,7 @@ int main(int argc, char *argv[])
if (!write_pid(PidFile))
logerror("Failed to write pidfile");
}
#endif
continue;
}
if (nfds == 0) {