From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GFK4Q-00066Z-EE for qemu-devel@nongnu.org; Mon, 21 Aug 2006 20:24:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GFK4P-00066I-KY for qemu-devel@nongnu.org; Mon, 21 Aug 2006 20:24:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GFK4P-00066D-Ew for qemu-devel@nongnu.org; Mon, 21 Aug 2006 20:24:41 -0400 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GFKBt-0007ey-WD for qemu-devel@nongnu.org; Mon, 21 Aug 2006 20:32:26 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GFK4G-0000pR-LF for qemu-devel@nongnu.org; Tue, 22 Aug 2006 02:24:32 +0200 Received: from host.ci.hillsboro.or.us ([4.18.224.6]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Aug 2006 02:24:32 +0200 Received: from void by host.ci.hillsboro.or.us with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Aug 2006 02:24:32 +0200 From: "alex" Date: Mon, 21 Aug 2006 17:24:14 -0700 Message-ID: Sender: news Subject: [Qemu-devel] mingw compile error patch Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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);