Rewrite test to not use function clock_gettime. The purpose
of this is to not have to link against -lrt because that causes
a different back-trace on certain x86 and s390x environments.
See the thread with subject 
"helgrind/tests/cond_timedwait_invalid failing on x86"
on valgrind-developers for more details.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12246 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
index 3271a54..3ca723b 100644
--- a/helgrind/tests/Makefile.am
+++ b/helgrind/tests/Makefile.am
@@ -185,8 +185,3 @@
 else
 annotate_hbefore_CFLAGS = $(AM_CFLAGS)
 endif
-
-if VGCONF_OS_IS_LINUX
-cond_timedwait_invalid_LDADD = -lrt
-endif
-
diff --git a/helgrind/tests/cond_timedwait_invalid.c b/helgrind/tests/cond_timedwait_invalid.c
index a8d0448..8c3bd86 100644
--- a/helgrind/tests/cond_timedwait_invalid.c
+++ b/helgrind/tests/cond_timedwait_invalid.c
@@ -1,4 +1,4 @@
-#include "config.h"
+
 #include <time.h>
 #include <pthread.h>
 #include <assert.h>
@@ -10,12 +10,12 @@
    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
    pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
 
-#ifdef HAVE_CLOCK_GETTIME
-   assert(clock_gettime(CLOCK_REALTIME, &abstime)==0);
-#else
+
+
+
    abstime.tv_sec = time(NULL) + 2;
    abstime.tv_nsec = 0;
-#endif
+
    abstime.tv_nsec += 1000000000;
    
    assert(pthread_mutex_lock(&mutex)==0);