]> sigrok.org Git - libsigrok.git/commitdiff
sr_buildinfo_libs_get(): Also support LIBUSBX_API_VERSION.
authorUwe Hermann <redacted>
Sun, 22 Jul 2018 15:57:34 +0000 (17:57 +0200)
committerUwe Hermann <redacted>
Sun, 22 Jul 2018 16:01:22 +0000 (18:01 +0200)
This fixes a build issue on some distros / libusb versions.

src/backend.c

index 0a9bf1361baf5b5e3d2e74acd977a26939678777..ef5cd260e280d426a20580cc64dbbfc46f4edaa6 100644 (file)
@@ -155,7 +155,12 @@ SR_API GSList *sr_buildinfo_libs_get(void)
        lv = libusb_get_version();
        m = g_slist_append(m, g_strdup_printf("%d.%d.%d.%d%s API 0x%08x",
                lv->major, lv->minor, lv->micro, lv->nano, lv->rc,
-               LIBUSB_API_VERSION));
+#if defined(LIBUSB_API_VERSION)
+               LIBUSB_API_VERSION
+#elif defined(LIBUSBX_API_VERSION)
+               LIBUSBX_API_VERSION
+#endif
+               ));
 #endif
        l = g_slist_append(l, m);
 #endif