diff options
| author | Manuel Teira Paz <mteira@apache.org> | 2009-03-10 08:19:28 +0000 |
|---|---|---|
| committer | Manuel Teira Paz <mteira@apache.org> | 2009-03-10 08:19:28 +0000 |
| commit | 10f2b2a6a1fe91e7b29fa74013baa0cf091bd64b (patch) | |
| tree | 94ddc7fcda761a3020bc07a7d26420a5ac578e28 /qpid/cpp/src/tests/failover_soak.cpp | |
| parent | a2740917f3be57c5a339d9b2d99926f6c0afddb0 (diff) | |
| download | qpid-python-10f2b2a6a1fe91e7b29fa74013baa0cf091bd64b.tar.gz | |
configure.ac:
- Add a SOCKLIBS definition, to define needed network libraries in Solaris
src/tests/failover_soak.cpp
- Replace usage of timersub with direct code, since timersub appears to be non-posix.
src/tests/Makefile.am
- Link against $(SOCKLIBS) when needed
src/tests/*
- Some qualifying needed for the Sun compiler
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@752019 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/failover_soak.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/failover_soak.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/failover_soak.cpp b/qpid/cpp/src/tests/failover_soak.cpp index d84b6d58f7..4f16e469b8 100644 --- a/qpid/cpp/src/tests/failover_soak.cpp +++ b/qpid/cpp/src/tests/failover_soak.cpp @@ -26,6 +26,8 @@ #include <sys/wait.h> #include <sys/time.h> #include <string.h> +#include <sys/types.h> +#include <signal.h> #include <string> #include <iostream> @@ -237,7 +239,14 @@ struct children : public vector<child *> vector<child *>::iterator i; for ( i = begin(); i != end(); ++ i ) { - timersub ( & now, &((*i)->startTime), & duration ); + //Not in POSIX + //timersub ( & now, &((*i)->startTime), & duration ); + duration.tv_sec = now.tv_sec - (*i)->startTime.tv_sec; + duration.tv_usec = now.tv_usec - (*i)->startTime.tv_usec; + if (duration.tv_usec < 0) { + --duration.tv_sec; + duration.tv_usec += 1000000; + } if ( (COMPLETED != (*i)->status) // child isn't done running && |
