From 62f574a4989c3c862444e2f8bb59396a18b30a1c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Apr 2009 14:08:34 +0200 Subject: adding missing Solaris linker options (network libs) --- tests/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 53a81a93..625995ae 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -32,9 +32,11 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ cfg.sh ourtail_SOURCES = ourtail.c -tcpflood_SOURCES = tcpflood.c chkseq_SOURCES = chkseq.c +tcpflood_SOURCES = tcpflood.c +tcpflood_LDADD = $(SOL_LIBS) + nettester_SOURCES = nettester.c getline.c nettester_LDADD = $(SOL_LIBS) -- cgit v1.2.3 From 396e211e5cfd195b7135947d425b089a0447fa88 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 5 Mar 2010 08:27:26 +0100 Subject: enabled compilation by using "racy" replacements for atomic instructions ... but this is not considered a real solution. For some of the uses, it may acutally be sufficient, but the implications need to be analyzed in detail. --- runtime/atomic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/atomic.h b/runtime/atomic.h index d5aaf56b..62ceb8b3 100644 --- a/runtime/atomic.h +++ b/runtime/atomic.h @@ -66,6 +66,9 @@ # define ATOMIC_DEC_AND_FETCH(data) (--(data)) # define ATOMIC_FETCH_32BIT(data) (data) # define ATOMIC_STORE_1_TO_32BIT(data) (data) = 1 +# define ATOMIC_STORE_1_TO_INT(data) (data) = 1 +# define ATOMIC_STORE_0_TO_INT(data) (data) = 0 +# define ATOMIC_CAS_VAL(data, oldVal, newVal) (data) = (newVal) #endif #endif /* #ifndef INCLUDED_ATOMIC_H */ -- cgit v1.2.3 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(-) 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