summaryrefslogtreecommitdiff
path: root/libaltos/libaltos.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2013-12-18 18:25:35 -0700
committerBdale Garbee <bdale@gag.com>2013-12-18 18:25:35 -0700
commitd9982c257463f23be940eea66bd4dc3aadff0043 (patch)
treea4744aa4f82b6e9a0a7d019c4112516191aed7c8 /libaltos/libaltos.c
parent1b97ed2b64bcbcd969124964f1e49837899f1c70 (diff)
parentb63fc05481bf6d57e6385704ce53c1c19afa9c2e (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'libaltos/libaltos.c')
-rw-r--r--libaltos/libaltos.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libaltos/libaltos.c b/libaltos/libaltos.c
index 4a6363ed..a623d5ae 100644
--- a/libaltos/libaltos.c
+++ b/libaltos/libaltos.c
@@ -53,6 +53,8 @@ altos_get_last_error(struct altos_error *error)
#ifdef DARWIN
+#include <unistd.h>
+
#undef USE_POLL
/* Mac OS X don't have strndup even if _GNU_SOURCE is defined */
@@ -887,15 +889,6 @@ altos_list_next(struct altos_list *list, struct altos_device *device)
if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) ||
!get_number (object, CFSTR(kUSBProductID), &device->product))
continue;
- if (list->ftdi) {
- if (device->vendor != 0x0403)
- continue;
- } else {
- if (device->vendor != 0xfffe)
- continue;
- if (device->product < 0x000a || 0x0013 < device->product)
- continue;
- }
if (get_string (object, CFSTR("IOCalloutDevice"), device->path, sizeof (device->path)) &&
get_string (object, CFSTR("USB Product Name"), device->name, sizeof (device->name)) &&
get_string (object, CFSTR("USB Serial Number"), serial_string, sizeof (serial_string))) {