Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to libusb-1.0 #25

Merged
merged 5 commits into from
Sep 14, 2020
Merged

Update to libusb-1.0 #25

merged 5 commits into from
Sep 14, 2020

Conversation

tickelton
Copy link
Contributor

This updates the host libraries and tools to use libusb-1.0 instead of libusb-0.1 as
version 0.1 is deprecated and no longer provided as a package in many recent
Linux distributions.

The changes were tested on Ubuntu 20.04 and Windows 10 Version 2004.
I do not have a macOS System available so I could not test that.

To be able to build and run the drivertest example on Linux I also had to include the fix
for issue #11, therefore this pull request would also close that issue.
Other than that I tried to keep the changes as minimal as possible and to not introduce
stylistic changes or changes to the behavior of any tools and libraries.

The target software is not affected by the changes in this pull request.

runtest.c used srandomdev() to initialize the random() function.
Since srandomdev is only available on *BSD systems, compilation
failed on Linux.
This commit introduces a compile switch to use srandom() on Linux
instea.
libs-host/hiddata.c and the Makefile for examples/hid-data were
converted to libusb-1.0.
usbtool and libs-host/opendevice.c have been converted
to use libusb-1.0.
This commit breaks the custom-class and drivertest
examples which still need to be converted accordingly.
This completes the libusb-1.0 update for all Unix host tools
and libraries.
This still needs to be tested on Windows as there probably
are still changes necessary that were not identified while
testing on Linux.
Fixes some minor issues that prevented compilation
of the host tools and libs on Windows after the update to
libusb-1.0.

This completes the update of the host libraries and tools to work
with libusb-1.0.
@starkjohann starkjohann merged commit aff0af2 into obdev:master Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants