Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Jun 2024 13:52:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        usb@FreeBSD.org
Subject:   [Bug 279556] libux_hotplug_callback_handle type incompatibility between FreeBSD and libusb
Message-ID:  <bug-279556-19105@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279556

            Bug ID: 279556
           Summary: libux_hotplug_callback_handle type incompatibility
                    between FreeBSD and libusb
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: usb
          Assignee: usb@FreeBSD.org
          Reporter: emaste@freebsd.org

See PR277799 for background. libusb_hotplug_callback_handle_struct has a
different type between FreeBSD and libusb

FreeBSD:

lib/libusb/libusb.h:typedef struct libusb_hotplug_callback_handle_struct
*libusb_hotplug_callback_handle;

libusb:

libusb/libusb.h:typedef int libusb_hotplug_callback_handle;

which caused a build failure:

../keepassxc-2.7.7/src/gui/osutils/nixutils/DeviceListenerLibUsb.cpp:71:21:
error: no matching function for call to 'libusb_hotplug_register_callback'
   71 |     const int ret =3D libusb_hotplug_register_callback(
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/libusb.h:597:5: note: candidate function not viable: no known
conversion from 'int *' to 'libusb_hotplug_callback_handle *' (aka
'libusb_hotplug_callback_handle_struct **') for 9th argument
  597 | int     libusb_hotplug_register_callback(libusb_context *ctx,
libusb_hotplug_event events, libusb_hotplug_flag flags, int vendor_id, int
product_id, int dev_class, libusb_hotplug_callback_fn cb_fn, void *user_dat=
a,
libusb_hotplug_callback_handle *handle);
      |         ^=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279556-19105>