Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3HLr-0008OI-IB for qemu-devel@nongnu.org; Mon, 02 Jun 2008 17:13:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3HLq-0008NM-2R for qemu-devel@nongnu.org; Mon, 02 Jun 2008 17:13:59 -0400 Received: from [199.232.76.173] (port=34601 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3HLp-0008NG-QP for qemu-devel@nongnu.org; Mon, 02 Jun 2008 17:13:57 -0400 Received: from bsdimp.com ([199.45.160.85]:50135 helo=harmony.bsdimp.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K3HLp-0007BI-FO for qemu-devel@nongnu.org; Mon, 02 Jun 2008 17:13:57 -0400 Date: Mon, 02 Jun 2008 15:12:15 -0600 (MDT) Message-Id: <20080602.151215.-1350519656.imp@bsdimp.com> Subject: Re: [Qemu-devel] [patch] Make qemu-nbd compile on OS X From: "M. Warner Losh" In-Reply-To: <20080602175417.GA19245@redhat.com> References: <4A9FE33F-BC49-4881-84CB-A751CCADB36D@hotmail.com> <20080602175417.GA19245@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: berrange@redhat.com, qemu-devel@nongnu.org In message: <20080602175417.GA19245@redhat.com> "Daniel P. Berrange" writes: : 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 : > +#else : > #include : > +#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 Yes. Years ago, malloc.h was typically needed for SunOS 4.x compatibility. Once malloc was codified to live in stdlib.h, malloc.h was deprecated. Warner