From ec091abff842fb5fc94d99d50f94080d25666ce9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 16 Feb 2006 11:51:00 +0000 Subject: some changes to support Solaris --- syslogd.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index 6939875c..2b5c1433 100644 --- a/syslogd.c +++ b/syslogd.c @@ -136,7 +136,11 @@ #define SYSLOG_NAMES #include #include +#ifdef __sun +#include +#else #include +#endif #include #include #include @@ -155,9 +159,11 @@ #include #include +#ifndef __sun #ifndef BSD #include #endif +#endif #include #include #include @@ -177,6 +183,16 @@ #include #endif +/* missing definitions for solaris + * 2006-02-16 Rger + */ +#ifdef __sun +#define LOG_AUTHPRIV LOG_AUTH +#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) +#define LOG_PRI(p) ((p) & LOG_PRIMASK) +#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) +#endif + #include "rsyslog.h" #include "template.h" #include "outchannel.h" @@ -219,6 +235,9 @@ #ifdef BSD #define _PATH_VARRUN "/var/run/" #endif +#ifdef __sun +#define _PATH_VARRUN "/var/run/" +#endif #define _PATH_LOGPID _PATH_VARRUN SYSLOGD_PIDNAME #else #define _PATH_LOGPID "/etc/" SYSLOGD_PIDNAME @@ -3637,8 +3656,6 @@ void printline(char *hname, char *msg, int bParseHost) } /* Decode a priority into textual information like auth.emerg. - * rgerhards: This needs to be changed for syslog-protocol - severities - * are then supported up to 2^32-1. */ char *textpri(pri) int pri; -- cgit