devel/android-tools-fastboot-devel: move FreeBSD code to C++
Copy files in order to fix the following errors.
files/usb_freebsd.cpp:132:4: error: assigning to 'usb_handle *' from
incompatible type 'void *'
h = malloc(sizeof(*h));
^ ~~~~~~~~~~~~~~~~~~
files/usb_freebsd.cpp:162:6: error: no matching function for call to
'libusb_bulk_transfer'
if (libusb_bulk_transfer(h->handle, h->ep_out, (void *)(long)_data,
len, &actlen, 0) < 0)
^~~~~~~~~~~~~~~~~~~~
/usr/include/libusb.h:478:5: note: candidate function not viable: cannot
convert argument of incomplete type 'void *' to 'uint8_t *' (aka 'unsigned char
*')
int libusb_bulk_transfer(libusb_device_handle * devh, uint8_t endpoint,
uint8_t *data, int length, int *transferred, uint32_t timeout);
^
files/usb_freebsd.cpp:172:6: error: no matching function for call to
'libusb_bulk_transfer'
if (libusb_bulk_transfer(h->handle, h->ep_in, _data, len, &actlen, 0)
< 0)
^~~~~~~~~~~~~~~~~~~~
/usr/include/libusb.h:478:5: note: candidate function not viable: cannot
convert argument of incomplete type 'void *' to 'uint8_t *' (aka 'unsigned char
*')
int libusb_bulk_transfer(libusb_device_handle * devh, uint8_t endpoint,
uint8_t *data, int length, int *transferred, uint32_t timeout);
^
3 errors generated.
fastboot.o: In function `find_item(char const*, char const*)':
fastboot.cpp:(.text+0xea): undefined reference to `get_my_path'