Windows branch: fix builds against libusb-win32 #1636
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this is currently somewhat hardcoded for MSYS2 packaging of
mingw-w64-x86_64-libusb-win32so if other environments (32-bit MSYS2, cross-builds on Linux, etc) would be pursued, changes tom4scripts here should get refactored for more flexibility.Currently this allows to build against "modern" (post 2011) releases of libusb-win32, to let someone iterate on making it functional as a variant of libusb-0.1 implementation.
Currently the driver quickly refuses to start:
...making such builds less useful than libusb-1.0 (and 0.1-compat over it) which at least try to collect data.
Possibly
libusb0.cand/or driver code has to grow some moreifdefs to differentiate assumptions about libusb implementation when building forWIN32(perhapsifdef HAVE_LUSB0_USB_His a decent quick start for this use-case). In particular, seems anotherusb_bussesdetection method should be tried (library method vs. library public variable).See also #1507