From a0e2516e0f10619ef708109ff3bc6b54b44d4193 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 4 Apr 2014 20:39:08 +0200 Subject: Use only clock_gettime, do not depend on librt clock_gettime is actually provided by libc, not librt, so we don't need the latter, and thus avoid the librt dependency, which would cause initialization issues. * sysdeps/generic/pt-condattr-setclock.c (pthread_condattr_setclock): Use clock_gettime instead of clock_getres to test for clock availability. * Makefile: Do not link against librt. --- sysdeps/generic/pt-condattr-setclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/pt-condattr-setclock.c b/sysdeps/generic/pt-condattr-setclock.c index c5a78ef..c8ac4ce 100644 --- a/sysdeps/generic/pt-condattr-setclock.c +++ b/sysdeps/generic/pt-condattr-setclock.c @@ -35,7 +35,7 @@ pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock) struct timespec ts; int res; - res = clock_getres (CLOCK_MONOTONIC, &ts); + res = clock_gettime (CLOCK_MONOTONIC, &ts); avail = res < 0 ? -1 : 1; } -- cgit v1.2.3