Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C0qoE-0001tH-Q1 for qemu-devel@nongnu.org; Fri, 27 Aug 2004 20:11:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C0qoD-0001sd-Kq for qemu-devel@nongnu.org; Fri, 27 Aug 2004 20:11:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C0qoD-0001sa-Hf for qemu-devel@nongnu.org; Fri, 27 Aug 2004 20:11:05 -0400 Received: from [212.238.201.82] (helo=xi.wantstofly.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C0qj2-0001sC-1U for qemu-devel@nongnu.org; Fri, 27 Aug 2004 20:05:44 -0400 Date: Sat, 28 Aug 2004 02:05:43 +0200 From: Lennert Buytenhek Subject: Re: [Qemu-devel] sparc? Message-ID: <20040828000543.GD8018@xi.wantstofly.org> References: <412DC42E.4070804@gmx.com> <412FC3CB.3010304@gmx.com> <20040827233405.GB8018@xi.wantstofly.org> <412FCAB7.1010209@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412FCAB7.1010209@gmx.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bochnig@pool.math.tu-berlin.de Cc: qemu-devel@nongnu.org On Sat, Aug 28, 2004 at 01:58:47AM +0200, Bochnig, Martin wrote: > Hello, Hi, > you're right - I may be impatient. > BTW he did post to the group only one hour ago. > Maybe he wants to respond later. Well.. sometimes he doesn't respond at all. I'm not sure whether it's a matter of patience or not, but in either case, it is somewhat frustrating. > vmdk2raw.c: In function `copy_virtual': > vmdk2raw.c:135: parse error before `const' > vmdk2raw.c:136: `nil' undeclared (first use in this function) > vmdk2raw.c:136: (Each undeclared identifier is reported only once > vmdk2raw.c:136: for each function it appears in.) > vmdk2raw.c: In function `open_vmdk': > vmdk2raw.c:194: parse error before `char' > vmdk2raw.c:195: `magic' undeclared (first use in this function) > make: *** [vmdk2raw] Error 1 Try this. I needed the same patch for compiling on Red Hat 7.3. diff -urN qemu-0.6.0.orig/vmdk2raw.c qemu-0.6.0/vmdk2raw.c --- qemu-0.6.0.orig/vmdk2raw.c 2004-07-10 20:20:09.000000000 +0200 +++ qemu-0.6.0/vmdk2raw.c 2004-08-28 02:03:50.924934899 +0200 @@ -129,10 +129,10 @@ /* the last chunk of the file can not be sparse * or the file will be truncated */ if (offset + length >= disk_limit) { + const char nil = 0; if (lseek64(out_fd, length-1, SEEK_CUR) == (off_t)-1) perror("lseek"); /* write the last NULL byte instead of seeking */ - const char nil = 0; write(out_fd, &nil, 1); } else { if (lseek64(out_fd, length, SEEK_CUR) == (off_t)-1) @@ -185,13 +185,13 @@ static int open_vmdk(const char *filename) { + char magic[4]; int fd = open(filename, O_RDONLY | O_LARGEFILE); if (fd == -1) { perror(filename); return -1; } - char magic[4]; if (read(fd, &magic, sizeof(magic)) != sizeof(magic)) { perror("read from disk"); return -1; --L