You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uses MAC_OS_X_VERSION_MAX_ALLOWED to determine whether to use the old or new name. This definition can be 120000 even if compiling on macOS 11, resulting in compiler warnings and a broken build.
It looks like MAC_OS_X_VERSION_MIN_REQUIRED should be used instead?
For reference, here is the error I ran when compiling on macOS 11:
n file included from vendor/github.com/karalabe/usb/libs.go:50:
vendor/github.com/karalabe/usb/libusb/libusb/os/darwin_usb.c:253:39: warning: 'kIOMainPortDefault' is only available on macOS 12.0 or newer [-Wunguarded-availability-new]
When I print the MAC_OS_X_VERSION_MAX_ALLOWED var during compilation, it was shown to be 120000.
Running into this again. @karalabe is this package still maintained?
The above fix was suboptimal also in that it uses the definition made in libusb inside of hidapi, even though these are separate libraries. The two libraries have in the meantime fixed it upstream by simply using 0 instead of kIOMainPortDefault. It would be good to pull the latest upstream changes instead of doing local patches.
This commit:
c7c6bc0#diff-030195b530be26a69d54ce9487a942a3b24568c08397d003492f4507e1217f16R33
uses
MAC_OS_X_VERSION_MAX_ALLOWED
to determine whether to use the old or new name. This definition can be 120000 even if compiling on macOS 11, resulting in compiler warnings and a broken build.It looks like
MAC_OS_X_VERSION_MIN_REQUIRED
should be used instead?Like in this patch:
https://bug-224632-attachments.webkit.org/attachment.cgi?id=426166 (from https://bugs.webkit.org/show_bug.cgi?id=224632).
The text was updated successfully, but these errors were encountered: