Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D04rd-0006RK-7e for qemu-devel@nongnu.org; Sat, 12 Feb 2005 16:31:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D04rJ-0006K5-KU for qemu-devel@nongnu.org; Sat, 12 Feb 2005 16:31:29 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D04rH-0006Gl-AX for qemu-devel@nongnu.org; Sat, 12 Feb 2005 16:31:19 -0500 Received: from [157.193.204.1] (helo=trappist.elis.UGent.be) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D04As-0006Zr-Rn for qemu-devel@nongnu.org; Sat, 12 Feb 2005 15:47:31 -0500 Received: from [157.193.206.33] (bigmac.elis.UGent.be [157.193.206.33]) by trappist.elis.UGent.be (8.11.6/8.11.6) with ESMTP id j1CKlP428573 for ; Sat, 12 Feb 2005 21:47:25 +0100 Mime-Version: 1.0 (Apple Message framework v619.2) Message-Id: Content-Type: multipart/mixed; boundary=Apple-Mail-1--1062457368 From: Jonas Maebe Date: Sat, 12 Feb 2005 21:47:25 +0100 Subject: [Qemu-devel] Patch to fix Mac OS X compilation 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 --Apple-Mail-1--1062457368 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hello, I've attached a patch to fix Mac OS X compilation (and some small cleanup of the Mach-O code in dyngen.c as well). Unfortunately, qemu "crashes" (i.e., reports a fatal error) almost immediately when trying to boot freedos, so it seems there are more errors. Hopefully, someone else can fix those now that compilation works again. Jonas --Apple-Mail-1--1062457368 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="qemu-macosx.patch" Content-Disposition: attachment; filename=qemu-macosx.patch Index: dyngen.c =================================================================== RCS file: /cvsroot/qemu/qemu/dyngen.c,v retrieving revision 1.37 diff -r1.37 dyngen.c 999c999 < case PPC_RELOC_LO16: fetch_next_pair_value(rel+1, &other_half); sectoffset = (sectoffset & 0xffff); --- > case PPC_RELOC_LO16: fetch_next_pair_value(rel+1, &other_half); sectoffset |= (other_half << 16); 1001c1001 < case PPC_RELOC_HI16: fetch_next_pair_value(rel+1, &other_half); sectoffset = (other_half & 0xffff); --- > case PPC_RELOC_HI16: fetch_next_pair_value(rel+1, &other_half); sectoffset |= ((uint16_t)(other_half & 0xffff)); 1003c1003 < case PPC_RELOC_HA16: fetch_next_pair_value(rel+1, &other_half); sectoffset = (other_half & 0xffff); --- > case PPC_RELOC_HA16: fetch_next_pair_value(rel+1, &other_half); sectoffset += ((int16_t)(other_half & 0xffff)); 1149d1148 < const char *name; 1152d1150 < name = find_str_by_index(sym->n_un.n_strx); 1155c1153 < if ( sym->n_type & N_STAB ) /* Debug symbols are skipped */ --- > if ( syment->n_type & N_STAB ) /* Debug symbols are skipped */ 1840c1838 < if(!sym_name) --- > if(!sym_name && (type != PPC_RELOC_BR24)) Index: osdep.c =================================================================== RCS file: /cvsroot/qemu/qemu/osdep.c,v retrieving revision 1.7 diff -r1.7 osdep.c 276c276 < #include --- > #include --Apple-Mail-1--1062457368--