pkgsrc/sysutils/rsyslog/patches/patch-tools_syslogd.c
fhajny 6ecf8e9bd8 Import rsyslog-8.4.0 as sysutils/rsyslog* (based on wip/rsyslog8).
Rsyslog is an enhanced syslogd supporting, among others, MySQL,
PostgreSQL, failover log destinations, syslog/tcp, fine grain
output format control, high precision timestamps, queued operations
and the ability to filter on any message part. It is quite
compatible to stock sysklogd and can be used as a drop-in
replacement.
2014-09-05 07:15:41 +00:00

36 lines
799 B
C

$NetBSD: patch-tools_syslogd.c,v 1.1 2014/09/05 07:15:41 fhajny Exp $
Need errno.h on NetBSD. Fix default PID path.
--- tools/syslogd.c.orig 2014-07-15 13:34:03.000000000 +0000
+++ tools/syslogd.c
@@ -58,15 +58,19 @@
#include <time.h>
#include <assert.h>
-#ifdef OS_SOLARIS
+#if defined(OS_SOLARIS) || defined(__NetBSD__)
# include <errno.h>
+#else
+# include <sys/errno.h>
+#endif
+
+#ifdef OS_SOLARIS
# include <fcntl.h>
# include <stropts.h>
# include <sys/termios.h>
# include <sys/types.h>
#else
# include <libgen.h>
-# include <sys/errno.h>
#endif
#include <sys/ioctl.h>
@@ -135,7 +139,7 @@ void rsyslogdDoDie(int sig);
#ifndef _PATH_LOGPID
-# define _PATH_LOGPID "/var/run/rsyslogd.pid"
+# define _PATH_LOGPID "@RSYSLOG_PIDDIR@/rsyslogd.pid"
#endif
#ifndef _PATH_TTY