From e8e80368b78238ea36b378cd37e94140fec29dc7 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Thu, 24 May 2018 14:55:20 +0300 Subject: [PATCH] Enable timerfd on sunos when available Closes #432 Signed-off-by: Nathan Hjelm --- libusb/os/sunos_usb.c | 10 ++++++++++ libusb/version_nano.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libusb/os/sunos_usb.c b/libusb/os/sunos_usb.c index 7150a3e9..495be4cb 100644 --- a/libusb/os/sunos_usb.c +++ b/libusb/os/sunos_usb.c @@ -1637,6 +1637,13 @@ sunos_usb_get_status(int fd) return (status); } +#ifdef USBI_TIMERFD_AVAILABLE +static clockid_t op_get_timerfd_clockid(void) +{ + return CLOCK_MONOTONIC; +} +#endif + const struct usbi_os_backend usbi_backend = { .name = "Solaris", .caps = 0, @@ -1669,6 +1676,9 @@ const struct usbi_os_backend usbi_backend = { .clear_transfer_priv = sunos_clear_transfer_priv, .handle_transfer_completion = sunos_handle_transfer_completion, .clock_gettime = sunos_clock_gettime, +#ifdef USBI_TIMERFD_AVAILABLE + .get_timerfd_clockid = op_get_timerfd_clockid, +#endif .device_priv_size = sizeof(sunos_dev_priv_t), .device_handle_priv_size = sizeof(sunos_dev_handle_priv_t), .transfer_priv_size = sizeof(sunos_xfer_priv_t), diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 8c03606c..76794377 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11322 +#define LIBUSB_NANO 11323