summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2006-02-16 11:51:00 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2006-02-16 11:51:00 +0000
commitec091abff842fb5fc94d99d50f94080d25666ce9 (patch)
treefe7ac50efc536a5f4d808a100f28c83b746cff62
parent5478a1a6589fb9a4ce2ac0583478bc309ab81c56 (diff)
downloadrsyslog-ec091abff842fb5fc94d99d50f94080d25666ce9.tar.gz
rsyslog-ec091abff842fb5fc94d99d50f94080d25666ce9.tar.xz
rsyslog-ec091abff842fb5fc94d99d50f94080d25666ce9.zip
some changes to support Solaris
-rw-r--r--NEWS1
-rw-r--r--rsyslog.h3
-rw-r--r--syslogd.c21
3 files changed, 23 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 9fe4f8ef..59621cf7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
---------------------------------------------------------------------------
Version 1.12.x (RGer), 2006-xx-xx
+- implemented some changes to support Solaris
---------------------------------------------------------------------------
Version 1.12.2 (RGer), 2006-02-15
- fixed a bug in the RFC 3339 date formatter. An extra space was added
diff --git a/rsyslog.h b/rsyslog.h
index 36ab14e4..59210753 100644
--- a/rsyslog.h
+++ b/rsyslog.h
@@ -16,6 +16,9 @@
* ############################################################# */
#ifndef NOLARGEFILE
+# undef _LARGEFILE_SOURCE
+# undef _LARGEFILE64_SOURCE
+# undef _FILE_OFFSET_BITS
# define _GNU_SOURCE
# define _LARGEFILE_SOURCE
# define _LARGEFILE64_SOURCE
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 <sys/syslog.h>
#include <sys/param.h>
+#ifdef __sun
+#include <errno.h>
+#else
#include <sys/errno.h>
+#endif
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -155,9 +159,11 @@
#include <netinet/in.h>
#include <netdb.h>
+#ifndef __sun
#ifndef BSD
#include <syscall.h>
#endif
+#endif
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <resolv.h>
@@ -177,6 +183,16 @@
#include <paths.h>
#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;