usb_hid uses undocumented cbuf API
The usb_hid input driver uses an undocumented cbuf kernel API on R5 (see
src/add-ons/kernel/drivers/input/usb_hid/hid.h). This API is different from the
cbuf implementation that is present in the Haiku kernel. It is therefore not
possible to build the usb_hid driver with TARGET_PLATFORM=haiku. I defined the
following to get it to build:
#define cbuf_init cbuf_get_chain
#define cbuf_delete cbuf_free_chain
#define cbuf_putn(x, y, z) cbuf_memcpy_to_chain(x, 0, y, z)
#define cbuf_getn(x, y, z) cbuf_memcpy_from_chain(x, 0, y, z)
But I highly doubt that it is correct. Especially the cbuf_putn/cbuf_getn which
probably should increment/decrement some position variable.
fixed in #18392