Restrict USBDK to Windows builds

This commit restricts ebdaea6f3b to just Win32 builds
This commit is contained in:
jacobopantoja 2020-04-11 00:11:23 +02:00 committed by akallabeth
parent 89e4e24c31
commit 0f8437d1d8
1 changed files with 2 additions and 0 deletions

View File

@ -879,6 +879,7 @@ UINT freerdp_urbdrc_client_subsystem_entry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS
if (rc != LIBUSB_SUCCESS)
goto fail;
#ifdef _WIN32
#if LIBUSB_API_VERSION >= 0x01000106
/* Prefer usbDK backend on windows. Not uspported on other platforms. */
rc = libusb_set_option(udevman->context, LIBUSB_OPTION_USE_USBDK);
@ -894,6 +895,7 @@ UINT freerdp_urbdrc_client_subsystem_entry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS
WLog_ERR(TAG, "LIBUSB_OPTION_USE_USBDK %s [%d]", libusb_strerror(rc), rc);
goto fail;
}
#endif
#endif
udevman->flags = UDEVMAN_FLAG_ADD_BY_VID_PID;