From e10e68c6ced6f7cfbb38f14f4eb5278524a86912 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Thu, 25 Feb 2016 10:05:49 -0700 Subject: threads_posix: use backend clock_gettime() Some platforms do not implement the optional clock_gettime(). Need to use the backend implementation instead. Signed-off-by: Nathan Hjelm --- libusb/os/threads_posix.c | 3 ++- libusb/version_nano.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libusb/os/threads_posix.c b/libusb/os/threads_posix.c index 89b05f3..3908907 100644 --- a/libusb/os/threads_posix.c +++ b/libusb/os/threads_posix.c @@ -35,6 +35,7 @@ #endif #include "threads_posix.h" +#include "libusbi.h" int usbi_mutex_init_recursive(pthread_mutex_t *mutex) { @@ -64,7 +65,7 @@ int usbi_cond_timedwait(pthread_cond_t *cond, struct timespec timeout; int r; - r = clock_gettime(CLOCK_REALTIME, &timeout); + r = usbi_backend->clock_gettime(USBI_CLOCK_REALTIME, &timeout); if (r < 0) return r; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 79b35c4..3da269c 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11063 +#define LIBUSB_NANO 11064 -- cgit v1.2.1