Make qemu-nbd compile on OS X
PATCH 1/1 Make qemu-nbd compile on OS X
The following is a patch to make qemu-nbd compile on Mac OS X Leopard (any other versions are untested)
qemu-nbd.c +4 -0
@@ -21,7 +21,11 @@#include "block_int.h" #include "nbd.h" +#ifdef __APPLE__ +#include <malloc/malloc.h> +#else #include <malloc.h> +#endif #include <stdarg.h> #include <stdio.h> #include <getopt.h>
Quoted 8 lines · C.W. Betts
The following is a patch to make qemu-nbd compile on Mac OS X Leopard (any other versions are untested)
Index:
qemu-nbd.c
===================================================================qemu-nbd.c +0
-0@@ -21,7 +21,11 @@#include "block_int.h"
qemu-nbd.c line 31
Quoted 10 lines
qemu-nbd.c +4
-0#include "nbd.h" +#ifdef __APPLE__ +#include <malloc/malloc.h> +#else #include <malloc.h> +#endif #include <stdarg.h> #include <stdio.h> #include <getopt.h>
You must also modify the configure: qemu-nbd is only compiled for linux (because others are not tested). if test expr "$target_list" : ".*softmmu.*" != 0 ; then
tools="qemu-img\$(EXESUF) $tools"
if [ "$linux" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) $tools"
fi
fi
Regards,
Laurent
----------------------- Laurent Vivier ---------------------- "The best way to predict the future is to invent it."
- Alan Kay