summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon>2008-04-09 08:11:22 +0200
committerRainer Gerhards <rgerhards@adiscon>2008-04-09 08:11:22 +0200
commita61f8543ff89a9eef1bef1686fff1035f5f79249 (patch)
tree90e0ebe8077ea234c1ed9e4e2bdc807ec14120ca
parent9b5fa059d026777ca9d95b66b17d95296fd6c1ff (diff)
downloadrsyslog-a61f8543ff89a9eef1bef1686fff1035f5f79249.tar.gz
rsyslog-a61f8543ff89a9eef1bef1686fff1035f5f79249.tar.xz
rsyslog-a61f8543ff89a9eef1bef1686fff1035f5f79249.zip
our BSD define conflicted with a BSD system define
renamed to OS_BSD
-rw-r--r--configure.ac2
-rw-r--r--net.c8
-rw-r--r--net.h2
-rw-r--r--omusrmsg.c6
-rw-r--r--syslogd.c2
-rw-r--r--tcpsrv.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 1516ef71..586f03e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ case "${host}" in
*-*-linux*)
;;
*-*-*darwin*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
- AC_DEFINE([BSD], [1], [Description])
+ AC_DEFINE([OS_BSD], [1], [Description])
;;
esac
diff --git a/net.c b/net.c
index ab669323..d0c51021 100644
--- a/net.c
+++ b/net.c
@@ -580,7 +580,7 @@ static int isAllowedSender(struct AllowedSenders *pAllowRoot, struct sockaddr *p
static int
should_use_so_bsdcompat(void)
{
-#ifndef BSD
+#ifndef OS_BSD
static int init_done;
static int so_bsdcompat_is_obsolete;
@@ -608,9 +608,9 @@ should_use_so_bsdcompat(void)
so_bsdcompat_is_obsolete = 1;
}
return !so_bsdcompat_is_obsolete;
-#else /* #ifndef BSD */
+#else /* #ifndef OS_BSD */
return 1;
-#endif /* #ifndef BSD */
+#endif /* #ifndef OS_BSD */
}
#ifndef SO_BSDCOMPAT
/* this shall prevent compiler errors due to undfined name */
@@ -948,7 +948,7 @@ int *create_udp_socket(uchar *hostname, uchar *pszPort, int bIsServer)
/* We need to enable BSD compatibility. Otherwise an attacker
* could flood our log files by sending us tons of ICMP errors.
*/
-#if !defined(BSD) && !defined(__hpux)
+#if !defined(OS_BSD) && !defined(__hpux)
if (should_use_so_bsdcompat()) {
if (setsockopt(*s, SOL_SOCKET, SO_BSDCOMPAT,
(char *) &on, sizeof(on)) < 0) {
diff --git a/net.h b/net.h
index 2004dcfc..6c3afb51 100644
--- a/net.h
+++ b/net.h
@@ -34,7 +34,7 @@
#define ADDR_NAME 0x01 /* address is hostname wildcard) */
#define ADDR_PRI6 0x02 /* use IPv6 address prior to IPv4 when resolving */
-#ifdef BSD
+#ifdef OS_BSD
# ifndef _KERNEL
# define s6_addr32 __u6_addr.__u6_addr32
# endif
diff --git a/omusrmsg.c b/omusrmsg.c
index c4008140..42d3291d 100644
--- a/omusrmsg.c
+++ b/omusrmsg.c
@@ -119,7 +119,7 @@ static void endtty()
* BSD because they are not available there. We only emulate what we actually
* need! rgerhards 2005-03-18
*/
-#ifdef BSD
+#ifdef OS_BSD
static FILE *BSD_uf = NULL;
void setutent(void)
{
@@ -145,7 +145,7 @@ void endutent(void)
fclose(BSD_uf);
BSD_uf = NULL;
}
-#endif
+#endif /* #ifdef OS_BSD */
/*
@@ -209,7 +209,7 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData)
/* is this slot used? */
if (ut.ut_name[0] == '\0')
continue;
-#ifndef BSD
+#ifndef OS_BSD
if (ut.ut_type != USER_PROCESS)
continue;
#endif
diff --git a/syslogd.c b/syslogd.c
index 59fbbc29..8f5aa5ef 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -216,7 +216,7 @@ static rsRetVal GlobalClassExit(void);
#if defined(SYSLOGD_PIDNAME)
# undef _PATH_LOGPID
# if defined(FSSTND)
-# ifdef BSD
+# ifdef OS_BSD
# define _PATH_VARRUN "/var/run/"
# endif
# if defined(__sun) || defined(__hpux)
diff --git a/tcpsrv.c b/tcpsrv.c
index ae5f3371..955fb9b5 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -327,7 +327,7 @@ static int *create_tcp_socket(tcpsrv_t *pThis)
/* We need to enable BSD compatibility. Otherwise an attacker
* could flood our log files by sending us tons of ICMP errors.
*/
-#ifndef BSD
+#ifndef OS_BSD
if(net.should_use_so_bsdcompat()) {
if (setsockopt(*s, SOL_SOCKET, SO_BSDCOMPAT,
(char *) &on, sizeof(on)) < 0) {