Skip to content
Permalink
Browse files

Add missing #ifdef __NetBSD__ for a platform specific cast

  • Loading branch information...
tih committed Jun 8, 2018
1 parent ca05e19 commit 0e01a1053fa6e6db1819616f15ee3f2eec523e75
Showing with 4 additions and 0 deletions.
  1. +4 −0 cpp/hidapi/libusb/hid.c
@@ -369,7 +369,11 @@ static wchar_t *get_usb_string(libusb_device_handle *dev, uint8_t idx)
inbytes = len-2;
outptr = (char*) wbuf;
outbytes = sizeof(wbuf);
#ifdef __NetBSD__
res = iconv(ic, (const char ** restrict)&inptr, &inbytes, &outptr, &outbytes);
#else
res = iconv(ic, &inptr, &inbytes, &outptr, &outbytes);
#endif
if (res == (size_t)-1) {
LOG("iconv() failed\n");
goto err;

0 comments on commit 0e01a10

Please sign in to comment.
You can’t perform that action at this time.