Skip to contentSkip to conversation

qga: Fix compilation for old versions of MinGW

PATCH Applied Stefan Weil 2 participants 3 messages Nov 10, 2013 – Nov 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qga: Fix compilation for old versions of MinGW

While MinGW-w64 can compile the qga code, MinGW from Ubuntu lenny (gcc-mingw32 4.4.2-3) shows these errors:

In file included from qga/vss-win32.c:17:
qga/vss-win32/requester.h:31:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_init«
qga/vss-win32/requester.h:32:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_deinit«

The macro STDAPI is unknown, so add the missing include file which defines it.

---

This patch also fixes the same error on the MinGW buildbot. I did not notice it earlier because I usually compile with MinGW-w64.

Regards,
Stefan

 qga/vss-win32/requester.h |    1 +
 1 file changed, 1 insertion(+)
qga/vss-win32/requester.h +1 -0
index cffec01..374f9b8 100644
@@ -13,6 +13,7 @@
 #ifndef VSS_WIN32_REQUESTER_H
 #define VSS_WIN32_REQUESTER_H
 
+#include <basetyps.h>           /* STDAPI */
 #include "qemu/compiler.h"
 
 #ifdef __cplusplus
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 2 lines · Stefan Weil

While MinGW-w64 can compile the qga code, MinGW from Ubuntu lenny (gcc-mingw32 4.4.2-3) shows these errors:

I guess you mean Debian lenny, not Ubuntu lenny here ;) And lenny is an "old-old-stable" Debian release - it was before squeeze which is now oldstable. Lenny has been released at 14 Feb 2009...

Quoted 12 lines

In file included from qga/vss-win32.c:17:
qga/vss-win32/requester.h:31:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_init«
qga/vss-win32/requester.h:32:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_deinit«

The macro STDAPI is unknown, so add the missing include file which defines it.

---

Quoted 8 lines

This patch also fixes the same error on the MinGW buildbot. I did not notice it earlier because I usually compile with MinGW-w64.

Regards,
Stefan

 qga/vss-win32/requester.h |    1 +
 1 file changed, 1 insertion(+)

Thanks, applied to the trivial-patches queue, with s/Ubuntu/Debian/ - hopefully this is okay :)

/mjt

#2 lore raw

Am 13.11.2013 12:53, schrieb Michael Tokarev:

Quoted 6 lines
Quoted 2 lines · Stefan Weil

While MinGW-w64 can compile the qga code, MinGW from Ubuntu lenny (gcc-mingw32 4.4.2-3) shows these errors:

I guess you mean Debian lenny, not Ubuntu lenny here ;) And lenny is an "old-old-stable" Debian release - it was before squeeze which is now oldstable. Lenny has been released at 14 Feb 2009...

It should have been Ubuntu Lucid (LTS).

Quoted 5 lines
 1 file changed, 1 insertion(+)

Thanks, applied to the trivial-patches queue, with s/Ubuntu/Debian/ - hopefully this is okay :)

/mjt

Debian Lenny is sufficiently old, so I am rather sure that its MinGW has the same problem, so this is fine, thanks.

Stefan