...because the OS does this for us.
*-darwin*)
AC_DEFINE(OS_DARWIN, [], [Darwin backend])
AC_SUBST(OS_DARWIN)
+ AC_DEFINE(USBI_OS_HANDLES_TIMEOUT, [], [Backend handles timeout])
AC_MSG_RESULT([Darwin/MacOS X])
backend="darwin"
AM_LDFLAGS="-Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation -Wl,-prebind -no-undefined"
static int handle_timeouts(struct libusb_context *ctx)
{
+ int r = 0;
+#ifndef USBI_OS_HANDLES_TIMEOUT
struct timespec systime_ts;
struct timeval systime;
struct usbi_transfer *transfer;
- int r = 0;
USBI_GET_CONTEXT(ctx);
pthread_mutex_lock(&ctx->flying_transfers_lock);
out:
pthread_mutex_unlock(&ctx->flying_transfers_lock);
+#endif
+
return r;
}
API_EXPORTED int libusb_get_next_timeout(libusb_context *ctx,
struct timeval *tv)
{
+#ifndef USBI_OS_HANDLES_TIMEOUT
struct usbi_transfer *transfer;
struct timespec cur_ts;
struct timeval cur_tv;
}
return 1;
+#else
+ return 0;
+#endif
}
/** \ingroup poll