summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-03-18 20:17:19 +0000
committerPete Batard <pbatard@gmail.com>2010-03-18 20:17:19 +0000
commitf569696ea951722aea523b6a60057fdec77d6647 (patch)
treee10572f24d163ae27a8798ee48d4a946b54b043e
parentf43d8e65dba4e71b3113d094881cf52f64e7d646 (diff)
downloadlibusb-f569696ea951722aea523b6a60057fdec77d6647.tar.gz
libusb_pollfd() now returns an error on Windowsr215
-rw-r--r--libusb/io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libusb/io.c b/libusb/io.c
index dd6229c..cbc0208 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -2257,6 +2257,7 @@ void usbi_remove_pollfd(struct libusb_context *ctx, int fd)
API_EXPORTED const struct libusb_pollfd **libusb_get_pollfds(
libusb_context *ctx)
{
+#ifndef OS_WINDOWS
struct libusb_pollfd **ret = NULL;
struct usbi_pollfd *ipollfd;
size_t i = 0;
@@ -2278,6 +2279,11 @@ API_EXPORTED const struct libusb_pollfd **libusb_get_pollfds(
out:
usbi_mutex_unlock(&ctx->pollfds_lock);
return (const struct libusb_pollfd **) ret;
+#else
+ usbi_err(ctx, "external polling of libusb's internal descriptors "\
+ "is not yet supported on Windows platforms");
+ return NULL;
+#endif
}
/* Backends call this from handle_events to report disconnection of a device.