diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-11-25 17:20:55 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-11-25 17:20:55 +0100 |
commit | a3c81f500a4d952ce93162a730cadee8fbc8116b (patch) | |
tree | ab2dad94763e4045d1d38c1e9a3be94fc15dc68a /tools | |
parent | afafd9e0d7b333c54613670f4b9dbe3ae90ec51d (diff) | |
download | rsyslog-a3c81f500a4d952ce93162a730cadee8fbc8116b.tar.gz rsyslog-a3c81f500a4d952ce93162a730cadee8fbc8116b.tar.xz rsyslog-a3c81f500a4d952ce93162a730cadee8fbc8116b.zip |
bugfix: replacements for atomic operations for non-int sized types had problems.
At least one instance of that problem could potentially lead
to abort (inside omfile).
Diffstat (limited to 'tools')
-rw-r--r-- | tools/omfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/omfile.c b/tools/omfile.c index 57089cfd..78f2bf8e 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -98,7 +98,11 @@ static pthread_mutex_t mutClock; static inline uint64 getClockFileAccess(void) { - return ATOMIC_INC_AND_FETCH(&clockFileAccess, &mutClock); +#if HAVE_ATOMIC_BUILTINS_64BIT + return ATOMIC_INC_AND_FETCH_uint64(&clockFileAccess, &mutClock); +#else + return ATOMIC_INC_AND_FETCH_unsigned(&clockFileAccess, &mutClock); +#endif } |