use sys/time.h for mingw compatiblity, use LIBUSB_CALL modifier for callback
authorDave Murphy <davem@devkitpro.org>
Sun, 13 May 2012 21:57:27 +0000 (22:57 +0100)
committerDave Murphy <davem@devkitpro.org>
Sun, 13 May 2012 21:57:27 +0000 (22:57 +0100)
src/stlink-usb.c

index d945f66ecc391abf500160c9de78a507d57dcf7d..580722766cb385f914119d079795786d23a1fa68 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdint.h>
-#include <time.h>
+#include <sys/time.h>
 #include <sys/types.h>
 #include <libusb.h>
 
@@ -57,7 +57,7 @@ struct trans_ctx {
     volatile unsigned long flags;
 };
 
-static void on_trans_done(struct libusb_transfer * trans) {
+static void LIBUSB_CALL on_trans_done(struct libusb_transfer * trans) {
     struct trans_ctx * const ctx = trans->user_data;
 
     if (trans->status != LIBUSB_TRANSFER_COMPLETED)