qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Patch to fix Mac OS X compilation
@ 2005-02-12 20:47 Jonas Maebe
  2005-02-13 13:30 ` Daniel Egger
  2005-02-13 14:30 ` Jonas Maebe
  0 siblings, 2 replies; 13+ messages in thread
From: Jonas Maebe @ 2005-02-12 20:47 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

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

[-- Attachment #2: qemu-macosx.patch --]
[-- Type: application/octet-stream, Size: 1409 bytes --]

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 <malloc.h>
---
> #include <stdlib.h>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-02-21 21:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-12 20:47 [Qemu-devel] Patch to fix Mac OS X compilation Jonas Maebe
2005-02-13 13:30 ` Daniel Egger
2005-02-13 14:36   ` Jonas Maebe
2005-02-13 14:30 ` Jonas Maebe
2005-02-19 20:00   ` Jonas Maebe
2005-02-20 14:29     ` Jonas Maebe
2005-02-21 18:58       ` Fabrice Bellard
2005-02-21 19:36         ` Jonas Maebe
2005-02-21 19:43           ` Jonas Maebe
2005-02-21 20:08           ` Fabrice Bellard
2005-02-21 20:29             ` Jonas Maebe
2005-02-21 20:27       ` Fabrice Bellard
2005-02-21 20:58         ` Jonas Maebe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).