Conditionalize use of ELIBACC on __linux__ as it is linux-specific

pull/10/head
Ryan Drake 2016-10-07 19:18:55 -07:00
parent 95e933e27c
commit aaab4c6b1d
1 changed files with 4 additions and 0 deletions

View File

@ -55,7 +55,11 @@ libx52_device* libx52_init(void)
rc = libusb_init(&(x52_dev->ctx));
if (rc) {
#if defined(__linux__)
errno = ELIBACC;
#else
errno = ENOENT;
#endif
goto err_recovery;
}
libusb_set_debug(x52_dev->ctx, 3);