Skip to contentSkip to conversation

[5749] Fix Windows build

Qemu-devel Anthony Liguori 1 participant 1 message Nov 18, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5749

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5749
Author:   aliguori
Date:     2008-11-18 21:52:54 +0000 (Tue, 18 Nov 2008)

Log Message:
-----------
Fix Windows build

ENOBUFS is not defined on Win32. Use ENOMEM instead which is more portable.

This was reported by Herv?\195?\169 Poussineau.

Modified Paths:
--------------
trunk/exec.c

Modified: trunk/exec.c
===================================================================

exec.c +2 -2
@@ -1312,7 +1312,7 @@
     }
     wp = qemu_malloc(sizeof(*wp));
     if (!wp)
-        return -ENOBUFS;
+        return -ENOMEM;
 
     wp->vaddr = addr;
     wp->len_mask = len_mask;
@@ -1397,7 +1397,7 @@
 
     bp = qemu_malloc(sizeof(*bp));
     if (!bp)
-        return -ENOBUFS;
+        return -ENOMEM;
 
     bp->pc = pc;
     bp->flags = flags;