summaryrefslogtreecommitdiff
path: root/osdep.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-08-05 12:58:59 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-08-05 12:58:59 +0200
commit12242a37d8eef68ba19776c9f5b1606843f3c236 (patch)
treefee4afd414788d2f232da1a99b5a323a616ada4f /osdep.c
parent59d71ddb432db04b57ee2658ce50a3e35d7db97e (diff)
parent91db0417ac64255a297d88543bc91b439a48c013 (diff)
Merge remote branch 'kraxel/spice.v14' into spice.kvm.v14spice.kvm.v14.spicevmc
Conflicts: Makefile.target configure hw/pc.c monitor.c pc-bios/vgabios-cirrus.bin pc-bios/vgabios.bin
Diffstat (limited to 'osdep.c')
-rw-r--r--osdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/osdep.c b/osdep.c
index 2375a69df..ed2fd400f 100644
--- a/osdep.c
+++ b/osdep.c
@@ -100,7 +100,12 @@ void *qemu_memalign(size_t alignment, size_t size)
#if defined(_POSIX_C_SOURCE) && !defined(__sun__)
int ret;
void *ptr;
+#if 0
ret = posix_memalign(&ptr, alignment, size);
+#else
+ ptr = memalign(alignment, size);
+ ret = (ptr == NULL) ? -1 : 0;
+#endif
if (ret != 0) {
fprintf(stderr, "Failed to allocate %zu B: %s\n",
size, strerror(ret));