The libusb backend hotplug work (#825) changed hidapi_thread_create() in libusb/hidapi_thread_pthread.h from returning void to returning int, so a pthread_create failure can be detected and unwound (a failed read-thread creation now reattaches the kernel driver and fails the open, rather than hanging forever in hidapi_thread_barrier_wait()).
Downstream projects that supply their own thread model via HIDAPI_THREAD_MODEL_INCLUDE (e.g. SDL) and still declare static void hidapi_thread_create(...) will fail to compile against the new call sites (if (hidapi_thread_create(...) != 0)). The migration is one line: change the return type to int and return the underlying create result (0 on success, non-zero on failure).
Filing so embedders get a heads-up before this reaches a release.
Drafted with Claude Code.
The libusb backend hotplug work (#825) changed
hidapi_thread_create()inlibusb/hidapi_thread_pthread.hfrom returningvoidto returningint, so apthread_createfailure can be detected and unwound (a failed read-thread creation now reattaches the kernel driver and fails the open, rather than hanging forever inhidapi_thread_barrier_wait()).Downstream projects that supply their own thread model via
HIDAPI_THREAD_MODEL_INCLUDE(e.g. SDL) and still declarestatic void hidapi_thread_create(...)will fail to compile against the new call sites (if (hidapi_thread_create(...) != 0)). The migration is one line: change the return type tointand return the underlying create result (0on success, non-zero on failure).Filing so embedders get a heads-up before this reaches a release.
Drafted with Claude Code.