devel/adb: new port

This commit is contained in:
c0dev0id
2026-07-08 11:08:05 +02:00
parent a91ecb0f1d
commit 8813f7e720
28 changed files with 786 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
/*
* OpenBSD stub implementations of the old-style adb USB API (usb_handle*).
*
* These are never called because should_use_libusb() always returns true on
* OpenBSD, but the linker requires them to resolve symbols referenced from
* adb/client/transport_usb.cpp.
*
* Licensed under the Apache License, Version 2.0.
*/
#include <stddef.h>
#include "client/usb.h"
struct usb_handle {};
void usb_init() {}
void usb_cleanup() {}
int usb_write(usb_handle*, const void*, int) { return -1; }
int usb_read(usb_handle*, void*, int) { return -1; }
int usb_close(usb_handle*) { return -1; }
void usb_reset(usb_handle*) {}
void usb_kick(usb_handle*) {}
size_t usb_get_max_packet_size(usb_handle*) { return 512; }