[flashrom] [PATCH 3/3] Properly include libusb-win32 header.

Stefan Tauner stefan.tauner at alumni.tuwien.ac.at
Mon Jan 19 21:39:36 CET 2015


libusb-win32 is using a different header file name for a while, use
that on Windows builds to make clear that this is currently the
correct header to include.

Hopefully this will change soonish with migrating away from libusb-0.

Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
---
 Makefile   | 5 +++++
 dediprog.c | 8 ++++++++
 2 files changed, 13 insertions(+)

diff --git a/Makefile b/Makefile
index 54ebfe4..03670d2 100644
--- a/Makefile
+++ b/Makefile
@@ -843,7 +843,12 @@ endef
 export LIBPCI_TEST
 
 define LIBUSB0_TEST
+#include "platform.h"
+#if IS_WINDOWS
+#include <lusb0_usb.h>
+#else
 #include <usb.h>
+#endif
 int main(int argc, char **argv)
 {
 	(void) argc;
diff --git a/dediprog.c b/dediprog.c
index 71a9f8b..4248499 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -17,11 +17,19 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include "platform.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <limits.h>
 #include <errno.h>
+
+#if IS_WINDOWS
+#include <lusb0_usb.h>
+#else
 #include <usb.h>
+#endif
+
 #include "flash.h"
 #include "chipdrivers.h"
 #include "programmer.h"
-- 
Kind regards, Stefan Tauner





More information about the flashrom mailing list