diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-04-04 20:39:08 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-04-04 20:39:08 +0200 |
commit | a0e2516e0f10619ef708109ff3bc6b54b44d4193 (patch) | |
tree | 177f684714fd9d15889894db1b30841f7bf0de5c /sysdeps/generic | |
parent | 3b391db91f70b2166951413ee1eccc78cd398a44 (diff) |
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.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/pt-condattr-setclock.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |