Merge pull request #61 from tgtakaoka/fix-linux-build

Fix linux build caused by pull request #58
This commit is contained in:
Daniel Beer 2018-06-27 15:19:22 +12:00 committed by GitHub
commit 1cb2e5664b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -43,7 +43,11 @@ static device_t fet_open_rf2500(const struct device_args *args)
return NULL;
}
#if defined(__APPLE__)
trans = rf2500hidapi_open(args->path, args->requested_serial);
#else
trans = rf2500_open(args->path, args->requested_serial);
#endif
if (!trans)
return NULL;

View File

@ -228,7 +228,7 @@ static const struct transport_class rf2500_transport = {
.set_modem = usbtr_set_modem
};
transport_t rf2500_libusb_open(const char *devpath, const char *requested_serial)
transport_t rf2500_open(const char *devpath, const char *requested_serial)
{
struct rf2500_transport *tr = malloc(sizeof(*tr));
struct usb_device *dev;

View File

@ -28,6 +28,6 @@
* A particular device may be specified in bus:dev form.
*/
transport_t rf2500_open(const char *dev_path, const char *requested_serial);
transport_t rf2500_libusb_open(const char *dev_path, const char *requested_serial);
transport_t rf2500hidapi_open(const char *dev_path, const char *requested_serial);
#endif

View File

@ -161,7 +161,7 @@ static const wchar_t * get_wc(const char *c)
return wc;
}
transport_t rf2500_open(const char *devpath, const char *requested_serial)
transport_t rf2500hidapi_open(const char *devpath, const char *requested_serial)
{
struct rf2500_transport *tr = malloc(sizeof(*tr));
hid_device *handle;
@ -197,7 +197,7 @@ transport_t rf2500_open(const char *devpath, const char *requested_serial)
free(tr);
hid_exit();
printc_err("rf2500: fallback to libusb backend\n");
return rf2500_libusb_open(devpath, requested_serial);
return rf2500_open(devpath, requested_serial);
}
tr->handle = handle;