qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] mingw compile error patch


From: alex
Subject: [Qemu-devel] mingw compile error patch
Date: Mon, 21 Aug 2006 17:24:14 -0700

Hi,
The patch below allows me to compile qemu on Windows, however it is still
not working.
The program exits immediately reporting that it can't open the hard disk
image.
GDB reports the offensive pies of code is in malloc(), which does not make
sense to me.
Am I doing something wrong?

qemu_mallocz (size=2680) at c:/qemu/osdep.c:190
190         ptr = qemu_malloc(size);
(gdb)
188     {
(gdb)
190         ptr = qemu_malloc(size);
(gdb)
qemu_malloc (size=2680) at c:/qemu/osdep.c:56
56          return malloc(size);
(gdb)

Program exited with code 01.
(gdb) where
(gdb) No stack.

---------patch------------

RCS file: /sources/qemu/qemu/block-raw.c,v
retrieving revision 1.7
diff -r1.7 block-raw.c
821a822,823
> static int find_cdrom(char *cdrom_name, int cdrom_name_size);
> static int find_device_type(const char *filename);
1095c1097
<     LARGE_INTEGER l;
---
>     ULARGE_INTEGER l;
1098c1100
<     switch(s->ftype) {
---
>     switch(s->type) {
1185c1187
<     memset(drives, 0, sizeof(drivers));
---
>     memset(drives, 0, sizeof(drives));
1204c1206
<
---
>     char drive_letter[2];
1207,1209c1209,1211
<         s->drive_letter[0] = p[0];
<         s->drive_letter[1] = '\0';
<         type = GetDriveType(s->drive_letter);
---
>         drive_letter[0] = p[0];
>         drive_letter[1] = '\0';
>         type = GetDriveType(drive_letter);







reply via email to

[Prev in Thread] Current Thread [Next in Thread]