From c3a2775f9df3123a7f3aa267dac3fca084106600 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 6 Apr 2024 13:59:53 +0400 Subject: [PATCH] Connection callback: add stubs for netbsd (#668) * netbsd hotplug stubs * Make cygwin happy (fix copied from libusb) --- netbsd/hid.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/netbsd/hid.c b/netbsd/hid.c index a9b841f81..bd7e75f38 100644 --- a/netbsd/hid.c +++ b/netbsd/hid.c @@ -742,6 +742,28 @@ void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *de } } +int HID_API_EXPORT HID_API_CALL hid_hotplug_register_callback(unsigned short vendor_id, unsigned short product_id, int events, int flags, hid_hotplug_callback_fn callback, void *user_data, hid_hotplug_callback_handle *callback_handle) +{ + /* Stub */ + (void)vendor_id; + (void)product_id; + (void)events; + (void)flags; + (void)callback; + (void)user_data; + (void)callback_handle; + + return -1; +} + +int HID_API_EXPORT HID_API_CALL hid_hotplug_deregister_callback(hid_hotplug_callback_handle callback_handle) +{ + /* Stub */ + (void)callback_handle; + + return -1; +} + HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number) { struct hid_device_info *devs;