Browse Source

Bugfix: Only define have_libusb if building with libusb support

Luke Dashjr 12 years ago
parent
commit
d03725a006
2 changed files with 4 additions and 3 deletions
  1. 2 3
      miner.c
  2. 2 0
      miner.h

+ 2 - 3
miner.c

@@ -191,10 +191,9 @@ bool use_curses = true;
 #else
 #else
 bool use_curses;
 bool use_curses;
 #endif
 #endif
-#ifndef HAVE_LIBUSB
-const
-#endif
+#ifdef HAVE_LIBUSB
 bool have_libusb;
 bool have_libusb;
+#endif
 static bool opt_submit_stale = true;
 static bool opt_submit_stale = true;
 static int opt_shares;
 static int opt_shares;
 static int opt_submit_threads = 0x40;
 static int opt_submit_threads = 0x40;

+ 2 - 0
miner.h

@@ -903,7 +903,9 @@ extern bool opt_fail_only;
 extern bool opt_autofan;
 extern bool opt_autofan;
 extern bool opt_autoengine;
 extern bool opt_autoengine;
 extern bool use_curses;
 extern bool use_curses;
+#ifdef HAVE_LIBUSB
 extern bool have_libusb;
 extern bool have_libusb;
+#endif
 extern int httpsrv_port;
 extern int httpsrv_port;
 extern int stratumsrv_port;
 extern int stratumsrv_port;
 extern char *opt_api_allow;
 extern char *opt_api_allow;