From 70dff0caca7a559dab90a494118dc4a2dbf1e72a Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 11 Mar 2014 10:31:59 -0400 Subject: [PATCH] build: libusb < 1.0.10 doesn't support libusb_get_version() --- Makefile | 2 ++ README | 3 --- backend_common.c | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f684951..87475ab 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ DEPS = backend_common.h SOURCES = backend_common.c $(addsuffix .c,$(addprefix backend_,$(BACKENDS))) +# CFLAGS += -DLIBUSB_PRE_1_0_10 + all: $(EXEC_NAME) $(BACKENDS) $(EXEC_NAME): $(SOURCES) $(DEPS) diff --git a/README b/README index 55dc0cd..b09cfeb 100644 --- a/README +++ b/README @@ -301,9 +301,6 @@ Mitsubishi CP-D70DW Mitsubishi CP-D707DW - - Work-in-progress (Unknown USB IDs): - Mitsubishi CP-K60DW-S Valid commands: diff --git a/backend_common.c b/backend_common.c index 2790a94..7a27d85 100644 --- a/backend_common.c +++ b/backend_common.c @@ -631,13 +631,14 @@ int main (int argc, char **argv) } } +#ifndef LIBUSB_PRE_1_0_10 if (dyesub_debug) { const struct libusb_version *ver; ver = libusb_get_version(); DEBUG(" ** running with libusb %d.%d.%d%s (%d)\n", ver->major, ver->minor, ver->micro, (ver->rc? ver->rc : ""), ver->nano ); - } +#endif /* Make sure a filename was specified */ if (!backend_cmd && (optind == argc || !argv[optind])) {