summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libusb/os/darwin_usb.c4
-rw-r--r--libusb/version_nano.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
index 204e1ef..0105e3c 100644
--- a/libusb/os/darwin_usb.c
+++ b/libusb/os/darwin_usb.c
@@ -71,6 +71,7 @@ static int process_new_device (struct libusb_context *ctx, io_service_t service)
#if defined(ENABLE_LOGGING)
static const char *darwin_error_str (int result) {
+ static char string_buffer[50];
switch (result) {
case kIOReturnSuccess:
return "no error";
@@ -103,7 +104,8 @@ static const char *darwin_error_str (int result) {
case kIOUSBHighSpeedSplitError:
return "high speed split error";
default:
- return "unknown error";
+ snprintf(string_buffer, sizeof(string_buffer), "unknown error (0x%x)", result);
+ return string_buffer;
}
}
#endif
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 9b72a0c..d576271 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10857
+#define LIBUSB_NANO 10858