From 34d1694e9d74c545995e86320befae5d6c5a9021 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 5 Mar 2010 12:53:15 +0100 Subject: bugfix: omfile.c did not properly compile without atomics while this worked on another platform, it did not work here, and failed to do so for good reasons ;) --- tools/omfile.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/omfile.c') diff --git a/tools/omfile.c b/tools/omfile.c index 9562e9cf..6c90243d 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -48,10 +48,13 @@ #include #include #include - #ifdef OS_SOLARIS # include #endif +#ifdef HAVE_ATOMIC_BUILTINS +# include +#endif + #include "conf.h" #include "syslogd-types.h" @@ -108,9 +111,11 @@ getClockFileAccess(void) { uint64 retVal; + BEGINfunc d_pthread_mutex_lock(&mutClock); retVal = ++clockFileAccess; d_pthread_mutex_unlock(&mutClock); + ENDfunc return retVal; } #endif /* #ifdef HAVE_ATOMIC_BUILTINS */ -- cgit v1.2.3