summaryrefslogtreecommitdiff
path: root/libusb/os
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@me.com>2016-02-25 10:05:49 -0700
committerNathan Hjelm <hjelmn@me.com>2016-02-25 10:25:23 -0700
commite10e68c6ced6f7cfbb38f14f4eb5278524a86912 (patch)
treec2bb0514fa6bae32c36d44062ab97f874f4adb4c /libusb/os
parent6e05325ab2353e95e20e9c5fe610a28a4c4d231d (diff)
downloadlibusb-darwin_gettime_fix.tar.gz
threads_posix: use backend clock_gettime()darwin_gettime_fix
Some platforms do not implement the optional clock_gettime(). Need to use the backend implementation instead. Signed-off-by: Nathan Hjelm <hjelmn@me.com>
Diffstat (limited to 'libusb/os')
-rw-r--r--libusb/os/threads_posix.c3
1 files changed, 2 insertions, 1 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;