qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] sparc?


From: Lennert Buytenhek
Subject: Re: [Qemu-devel] sparc?
Date: Sat, 28 Aug 2004 02:05:43 +0200
User-agent: Mutt/1.4.1i

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




reply via email to

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