[Bug 293567] net/usbredir: build error, undeclared libusb_set_option

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 03 Mar 2026 22:16:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293567

            Bug ID: 293567
           Summary: net/usbredir: build error, undeclared
                    libusb_set_option
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: bofh@freebsd.org
          Reporter: jcfyecrayz@liamekaens.com
          Assignee: bofh@freebsd.org
             Flags: maintainer-feedback?(bofh@freebsd.org)

build error for net/usbredir after recent update to 0.9.0 ...

usbredirect.c:531:19: error: call to undeclared function 'libusb_set_option';
ISO C99 and later do not support implicit function declarations
[-Werror,-Wimplicit-function-declaration]
  531 |         int ret = libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL,
LIBUSB_LOG_LEVEL_NONE);
      |                   ^
usbredirect.c:531:19: note: did you mean 'libusb_get_version'?
/usr/include/libusb.h:478:30: note: 'libusb_get_version' declared here
  478 | const struct libusb_version *libusb_get_version(void);

This was on stable/13, but I don't see libusb_set_option in libusb on
freebsd-current either.

It looks like having devel/glib20 installed triggers usbredir to build "tools".
So a workaround is to explicitly add --without-tools to CONFIGURE_ARGS.

-- 
You are receiving this mail because:
You are the assignee for the bug.