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

fix building with mingw-w64 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WinterMute
Copy link

Some relatively minor fixes to get this building for windows using mingw-w64

libusb.h pulls in windows.h on windows which has it's own typedefs for BYTE, UCHAR etc. DWORD is typedef'd as unsigned long though which causes build errors despite LLP64 meaning that long & int are the same size. Replacing the problem variables with UINT works fine.

defining _POSIX_THREAD_SAFE_FUNCTIONS enables localtime_r in the mingw-w64 headers.

@mightymos
Copy link

mightymos commented Apr 26, 2022

Thanks for this, compiles on Windows 10.

EDIT:
Working for orange pi 4 lts (rk3399), if libwdi (zadig) is used to replace rockchip driver with WinUSB:
https://github.com/pbatard/libwdi/releases

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