qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch] Make qemu-nbd compile on OS X


From: Laurent Vivier
Subject: Re: [Qemu-devel] [patch] Make qemu-nbd compile on OS X
Date: Mon, 2 Jun 2008 20:34:11 +0200


Le 2 juin 08 à 19:54, Daniel P. Berrange a écrit :

On Mon, Jun 02, 2008 at 11:44:17AM -0600, C.W. Betts wrote:
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  (revision 4654)
+++ qemu-nbd.c  (working copy)
@@ -21,7 +21,11 @@
#include "block_int.h"
#include "nbd.h"

+#ifdef __APPLE__
+#include <malloc/malloc.h>
+#else
#include <malloc.h>
+#endif


The include of malloc.h looks rather bogus to me. malloc() is part
of stdlib.h, and is not even used in this file anyway. It compiles fine
on Linux if you remove include of malloc.h entirely


I agree, "man malloc" on MacOS X gives:

"MALLOC(3) BSD Library Functions Manual MALLOC(3)

NAME
     malloc, calloc, valloc, realloc, reallocf, free, malloc_size,
     malloc_good_size -- memory allocation

SYNOPSIS
     #include <stdlib.h>
..."

Laurent

----------------------- Laurent Vivier ----------------------
"The best way to predict the future is to invent it."
- Alan Kay









reply via email to

[Prev in Thread] Current Thread [Next in Thread]