-
Notifications
You must be signed in to change notification settings - Fork 243
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 compilation on macOS #183
Conversation
Technically these should really be included unconditionally, since they're standard headers. |
Hi resuna, thank you for your comment. I checked the man page of these two headers. <strings.h> is in POSIX standard. For <alloca.h>, though it is not part of Standard C or any POSIX standard, it is actually available on many OS/compilers. Changed to unconditional inclusion. |
Thanks for the PR! I will probably go with removing the use of alloca entirely instead (it's the only use of it in the source tree) |
What's the failure that requires |
Could you check if #185 works for you? |
I agree! |
Yes... |
Yes, it works well on my M1 Mac. I noticed #181, the problem is probably that libusb is not located at standard library search path. On my system, libusb's dylib installed by Homebrew cannot be found without manually setting LDFLAGS="-L/opt/homebrew/lib" environment variable. |
Yeh, alloca is a gcc thing but since pretty much every compiler is based on gcc or clang these days ... Anyway, Oliver has a separate pull request for this that replaces alloca with malloc, and I think we're going with that. Good to know on the libusb thing. I have requested an M1 laptop from work but my current laptop is a 2019 MBP so I don't think I'm going to get a refresh this year. |
Glad to use Oliver's PR. Closing this one. 👍 |
No description provided.