Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KP6Mj-00083x-RH for qemu-devel@nongnu.org; Fri, 01 Aug 2008 21:57:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KP6Mi-00083U-Eu for qemu-devel@nongnu.org; Fri, 01 Aug 2008 21:57:05 -0400 Received: from [199.232.76.173] (port=39431 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KP6Mi-00083Q-8D for qemu-devel@nongnu.org; Fri, 01 Aug 2008 21:57:04 -0400 Received: from savannah.gnu.org ([199.232.41.3]:47403 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KP6Mi-0003R9-0I for qemu-devel@nongnu.org; Fri, 01 Aug 2008 21:57:04 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KP6Mh-0001nZ-Cd for qemu-devel@nongnu.org; Sat, 02 Aug 2008 01:57:03 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KP6Mh-0001nE-1f for qemu-devel@nongnu.org; Sat, 02 Aug 2008 01:57:03 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Sat, 02 Aug 2008 01:57:03 +0000 Subject: [Qemu-devel] [4982] Fix compilation of nbd on Solaris (Andreas Faerber) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4982 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4982 Author: aliguori Date: 2008-08-02 01:57:02 +0000 (Sat, 02 Aug 2008) Log Message: ----------- Fix compilation of nbd on Solaris (Andreas Faerber) Compilation of QEMU is currently broken on Solaris due to nbd's use of _IO and due to network libraries not being linked into qemu-img. The attached patch adds the appropriate libraries (copied from Makefile.target) and includes an additional Sun-specific header for _IO. With these fixes it compiles okay, on OpenSolaris snv_93 (amd64). Signed-off-by: Andreas Faerber Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/Makefile trunk/nbd.c Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2008-08-01 17:14:35 UTC (rev 4981) +++ trunk/Makefile 2008-08-02 01:57:02 UTC (rev 4982) @@ -24,6 +24,10 @@ LIBS+=$(AIOLIBS) +ifdef CONFIG_SOLARIS +LIBS+=-lsocket -lnsl -lresolv +endif + all: $(TOOLS) $(DOCS) recurse-all SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) Modified: trunk/nbd.c =================================================================== --- trunk/nbd.c 2008-08-01 17:14:35 UTC (rev 4981) +++ trunk/nbd.c 2008-08-02 01:57:02 UTC (rev 4982) @@ -22,6 +22,9 @@ #include #include #include +#ifdef __sun__ +#include +#endif #include #include #include