After base 749318f2ae56127abdffee405f8f4658efa1c807 ("libusb: capsicumize libusb"), sysutils/smartmontools fails to build with errors similar to: os_freebsd.cpp:2227:9: error: no matching function for call to 'libusb20_be_alloc_default' 2227 | pbe = libusb20_be_alloc_default(); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/libusb20.h:299:26: note: candidate function not viable: requires single argument 'pctx', but no arguments were provided 299 | struct libusb20_backend *libusb20_be_alloc_default(struct libusb20_be_ctx *pctx); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. This is because base 749318f2ae56127abdffee405f8f4658efa1c807 changed the prototype for libusb20_be_alloc_default() to add a "struct libusb20_be_ctx *pctx" parameter. It looks like passing NULL is fine in this case. Since there was no separate __FreeBSD_version bump for this libusb refactoring, use base f77fa28422ee455580d44498a4f36c6418e96dd0 ("video: bump __FreeBSD_version for video(4) refactor") instead, which was committed one day later.
Created attachment 273804 [details] sysutils/smartmontools: fix build after base 749318f2ae56
This should go upstream? https://github.com/smartmontools/smartmontools/
(In reply to Dimitry Andric from comment #1) I bump the LIBUSB_VERSION in the different patch but at the very close time. Would it be better to check that?
(In reply to ShengYi Hung from comment #3) Unfortunately, LIBUSB_API_VERSION is not available in libusb20.h, which smartmontools uses. You might consider a LIBUSB20_API_VERSION? I'm unsure what the Linux world does here.