summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-07 09:37:43 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-07 09:37:43 +0000
commit02ca960691b02f75019a46ba778bb10cf0bdd2e6 (patch)
tree157af95ae47063559675f5959971419a90860843
parentacb7dae3ae782dae451f2f7a2322138ee495244a (diff)
downloadrsyslog-02ca960691b02f75019a46ba778bb10cf0bdd2e6.tar.gz
rsyslog-02ca960691b02f75019a46ba778bb10cf0bdd2e6.tar.xz
rsyslog-02ca960691b02f75019a46ba778bb10cf0bdd2e6.zip
applied patch from Michel Samia to fix compilation when the pthreads
feature is disabled
-rw-r--r--ChangeLog2
-rw-r--r--omfwd.c2
-rw-r--r--syslogd.c4
3 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 48e37f04..e9e3789a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
Version 1.18.1 (rgerhards), 2007-08-??
- applied a patch from varmojfekoj which solved a potential segfault
of rsyslogd on HUP
+- applied patch from Michel Samia to fix compilation when the pthreads
+ feature is disabled
---------------------------------------------------------------------------
Version 1.18.0 (rgerhards), 2007-08-03
- rsyslog now supports fallback actions when an action did not work. This
diff --git a/omfwd.c b/omfwd.c
index c1172b0c..33d4af8c 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -44,6 +44,8 @@
#include <unistd.h>
#ifdef USE_PTHREADS
#include <pthread.h>
+#else
+#include <fcntl.h>
#endif
#include "rsyslog.h"
#include "syslogd.h"
diff --git a/syslogd.c b/syslogd.c
index 4c031ea7..2bd3206f 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2235,6 +2235,7 @@ static void logmsgInternal(int pri, char *msg, int flags)
getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
flags |= INTERNAL_MSG;
+#ifdef USE_PTHREADS
if(bRunningMultithreaded == 0) { /* not yet in queued mode */
iminternalAddMsg(pri, pMsg, flags);
} else {
@@ -2244,6 +2245,9 @@ static void logmsgInternal(int pri, char *msg, int flags)
logmsg(pri, pMsg, flags);
MsgDestruct(pMsg);
}
+#else
+ iminternalAddMsg(pri, pMsg, flags);
+#endif
}
/*