build: libusb < 1.0.10 doesn't support libusb_get_version()

This commit is contained in:
Solomon Peachy 2014-03-11 10:31:59 -04:00
parent 7b80c3b226
commit 70dff0caca
3 changed files with 4 additions and 4 deletions

View file

@ -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)

3
README
View file

@ -301,9 +301,6 @@
Mitsubishi CP-D70DW
Mitsubishi CP-D707DW
Work-in-progress (Unknown USB IDs):
Mitsubishi CP-K60DW-S
Valid commands:

View file

@ -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])) {