From 489c6651f91a5d799b4296c0492b0227c6effb9f Mon Sep 17 00:00:00 2001 From: CLARATION Date: Mon, 6 Jul 2026 19:48:30 -0700 Subject: [PATCH] fix(libusb): make this linux only --- src/usb/libusb/usb_libusb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/usb/libusb/usb_libusb.c b/src/usb/libusb/usb_libusb.c index d54bb45..1ad19c4 100644 --- a/src/usb/libusb/usb_libusb.c +++ b/src/usb/libusb/usb_libusb.c @@ -128,6 +128,7 @@ bool send_interface_bulk_transfer(const usb_handle_t *handle, void *data, int le { return r; } + #if defined(__linux__) // We only get here on ENOMEM FILE *f = fopen("/sys/module/usbcore/parameters/usbfs_memory_mb", "r"); if(f) @@ -146,6 +147,7 @@ bool send_interface_bulk_transfer(const usb_handle_t *handle, void *data, int le maxLen = (uint32_t)(max << 19); } else + #endif { // Just 1MB by default? maxLen = 0x100000;