summaryrefslogtreecommitdiff
path: root/usrp/host/apps/usrper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'usrp/host/apps/usrper.cc')
-rw-r--r--usrp/host/apps/usrper.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/usrp/host/apps/usrper.cc b/usrp/host/apps/usrper.cc
index f8e98341f..d1270589b 100644
--- a/usrp/host/apps/usrper.cc
+++ b/usrp/host/apps/usrper.cc
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <libusb-1.0/libusb.h> /* needed for usb functions */
#include <getopt.h>
#include <assert.h>
#include <errno.h>
@@ -36,6 +35,12 @@
#include "usrp_spi_defs.h"
#include <string.h>
+#ifdef HAVE_LIBUSB_1
+#include <libusb-1.0/libusb.h>
+#else
+#include <usb.h>
+#endif
+
char *prog_name;
static void
@@ -197,7 +202,7 @@ main (int argc, char **argv)
usrp_one_time_init ();
- struct libusb_device *udev = usrp_find_device (which_board, fx2_ok_p);
+ libusb_device *udev = usrp_find_device (which_board, fx2_ok_p);
if (udev == 0){
fprintf (stderr, "%s: failed to find usrp[%d]\n", prog_name, which_board);
exit (1);
@@ -211,7 +216,7 @@ main (int argc, char **argv)
fprintf (stderr, "%s: found unconfigured FX2; needs firmware.\n", prog_name);
}
- struct libusb_device_handle *udh = usrp_open_cmd_interface (udev);
+ libusb_device_handle *udh = usrp_open_cmd_interface (udev);
if (udh == 0){
fprintf (stderr, "%s: failed to open_cmd_interface\n", prog_name);
exit (1);