Re: git: 749318f2ae56 - main - libusb: capsicumize libusb

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Wed, 19 Aug 2026 17:58:04 UTC
Please see the patch (ports/3982e2c0328d) applied to 
ports/multimedia/webacmd for how to resolve the build error.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e**(i*pi)+1=0


In message <aoXqZrNjN84jeHAG@uriah.heep.sax.de>, Joerg Wunsch writes:
> Too bad this changes the API of libusb 2.0 in an incompatible way.
>
> I have an (external) application that uses libusb 2.0 when it is being
> compiled on FreeBSD (AVaRICE) which now breaks.  Nobody ever declared
> that the libusb 2.0 API were a FreeBSD-internal one only not to be
> used by outside code.
>
> Could I convince people to at least add a version ID macro to the
> public header file that can be used to test the API level?  Like
>
> #define LIBUSB20_VERSION 202608
>
> That would allow constructs like
>
> #if defined(LIBUSB20_VERSION) && (LIBUSB20_VERSION >= 202608)
> // use libusb20_be_ctx here
> #endif
>
> (Sorry, I missed the review server item before.)
>
> As ShengYi Hung wrote:
>
> > @@ -294,11 +295,13 @@ int	libusb20_be_set_template(struct libusb20_backen
> d *pbe, int temp);
> >  
> >  /* USB backend operations */
> >  
> > -struct libusb20_backend *libusb20_be_alloc(const struct libusb20_backend_m
> ethods *methods);
> > -struct libusb20_backend *libusb20_be_alloc_default(void);
> > -struct libusb20_backend *libusb20_be_alloc_freebsd(void);
> > -struct libusb20_backend *libusb20_be_alloc_linux(void);
> > -struct libusb20_backend *libusb20_be_alloc_ugen20(void);
> > +struct libusb20_backend *libusb20_be_alloc(const struct libusb20_backend_m
> ethods *methods, struct libusb20_be_ctx *pctx);
> > +struct libusb20_backend *libusb20_be_alloc_default(struct libusb20_be_ctx 
> *pctx);
> > +struct libusb20_backend *libusb20_be_alloc_freebsd(struct libusb20_be_ctx 
> *pctx);
> > +struct libusb20_backend *libusb20_be_alloc_linux(struct libusb20_be_ctx *p
> ctx);
> > +struct libusb20_backend *libusb20_be_alloc_ugen20(struct libusb20_be_ctx *
> pctx);
> > +struct libusb20_be_ctx *libusb20_be_ctx_alloc(void);
> > +void	libusb20_be_ctx_free(struct libusb20_be_ctx *pctx);
> >  struct libusb20_device *libusb20_be_device_foreach(struct libusb20_backend
>  *pbe, struct libusb20_device *pdev);
> >  void	libusb20_be_dequeue_device(struct libusb20_backend *pbe, struct
>  libusb20_device *pdev);
> >  void	libusb20_be_enqueue_device(struct libusb20_backend *pbe, struct
>  libusb20_device *pdev);
>
> -- 
> cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL
>
> http://www.sax.de/~joerg/
> Never trust an operating system you don't have sources for. ;-)
>