diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-23 12:38:44 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-23 12:38:44 +0100 |
commit | c1e3a032b447487ced9873b98a015046778d2b04 (patch) | |
tree | 93dfe26b1843674aa86a5e1d86493a6a6406675d /tools/omfile.c | |
parent | a61e164a977ff17b90f9a301dacbc5a01aca7e7e (diff) | |
parent | a6df6a1740956b72acb7cbf9d17a51635ea18dfc (diff) | |
download | rsyslog-c1e3a032b447487ced9873b98a015046778d2b04.tar.gz rsyslog-c1e3a032b447487ced9873b98a015046778d2b04.tar.bz2 rsyslog-c1e3a032b447487ced9873b98a015046778d2b04.zip |
Merge branch 'master-solaris'
Diffstat (limited to 'tools/omfile.c')
-rw-r--r-- | tools/omfile.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <libgen.h> #include <unistd.h> #include <sys/file.h> - #ifdef OS_SOLARIS # include <fcntl.h> #endif +#ifdef HAVE_ATOMIC_BUILTINS +# include <pthread.h> +#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 */ |