qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.7] wxx: Fix compilation of host-libusb.c
@ 2016-07-29  6:55 Stefan Weil
  2016-08-02 11:34 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2016-07-29  6:55 UTC (permalink / raw)
  To: QEMU Developer; +Cc: Peter Maydell, Gerd Hoffmann, Stefan Weil

libusb.h uses the WINAPI calling convention for all function callbacks.

Cross compilation with Mingw-w64 on Cygwin fails when this calling
convention is missing.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 hw/usb/host-libusb.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index da59c29..c632fd8 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -358,7 +358,7 @@ static USBHostRequest *usb_host_req_find(USBHostDevice *s, USBPacket *p)
     return NULL;
 }
 
-static void usb_host_req_complete_ctrl(struct libusb_transfer *xfer)
+static void LIBUSB_CALL usb_host_req_complete_ctrl(struct libusb_transfer *xfer)
 {
     USBHostRequest *r = xfer->user_data;
     USBHostDevice  *s = r->host;
@@ -391,7 +391,7 @@ out:
     }
 }
 
-static void usb_host_req_complete_data(struct libusb_transfer *xfer)
+static void LIBUSB_CALL usb_host_req_complete_data(struct libusb_transfer *xfer)
 {
     USBHostRequest *r = xfer->user_data;
     USBHostDevice  *s = r->host;
@@ -447,7 +447,8 @@ static void usb_host_req_abort(USBHostRequest *r)
 
 /* ------------------------------------------------------------------------ */
 
-static void usb_host_req_complete_iso(struct libusb_transfer *transfer)
+static void LIBUSB_CALL
+usb_host_req_complete_iso(struct libusb_transfer *transfer)
 {
     USBHostIsoXfer *xfer = transfer->user_data;
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.7] wxx: Fix compilation of host-libusb.c
  2016-07-29  6:55 [Qemu-devel] [PATCH for-2.7] wxx: Fix compilation of host-libusb.c Stefan Weil
@ 2016-08-02 11:34 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2016-08-02 11:34 UTC (permalink / raw)
  To: Stefan Weil; +Cc: QEMU Developer, Peter Maydell

On Fr, 2016-07-29 at 08:55 +0200, Stefan Weil wrote:
> libusb.h uses the WINAPI calling convention for all function
> callbacks.
> 
> Cross compilation with Mingw-w64 on Cygwin fails when this calling
> convention is missing.

queued up both mingw fixes.

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-02 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29  6:55 [Qemu-devel] [PATCH for-2.7] wxx: Fix compilation of host-libusb.c Stefan Weil
2016-08-02 11:34 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).