]> git.sur5r.net Git - openocd/blobdiff - src/jtag/drivers/ftdi.c
ftdi: make ftdi_location command depend on libusb1 version
[openocd] / src / jtag / drivers / ftdi.c
index b32fa6cb2338b545a3214998e6529cd9f608d8de..3f74f1cae202c7c8bbb5e9b7fc3bdb017f489274 100644 (file)
@@ -699,6 +699,7 @@ COMMAND_HANDLER(ftdi_handle_serial_command)
        return ERROR_OK;
 }
 
+#ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
 COMMAND_HANDLER(ftdi_handle_location_command)
 {
        if (CMD_ARGC == 1) {
@@ -711,6 +712,7 @@ COMMAND_HANDLER(ftdi_handle_location_command)
 
        return ERROR_OK;
 }
+#endif
 
 COMMAND_HANDLER(ftdi_handle_channel_command)
 {
@@ -889,6 +891,7 @@ static const struct command_registration ftdi_command_handlers[] = {
                .help = "set the serial number of the FTDI device",
                .usage = "serial_string",
        },
+#ifdef HAVE_LIBUSB_GET_PORT_NUMBERS
        {
                .name = "ftdi_location",
                .handler = &ftdi_handle_location_command,
@@ -896,6 +899,7 @@ static const struct command_registration ftdi_command_handlers[] = {
                .help = "set the USB bus location of the FTDI device",
                .usage = "<bus>:port[,port]...",
        },
+#endif
        {
                .name = "ftdi_channel",
                .handler = &ftdi_handle_channel_command,