qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4982] Fix compilation of nbd on Solaris (Andreas Faerber)
@ 2008-08-02  1:57 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-08-02  1:57 UTC (permalink / raw)
  To: qemu-devel

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 <andreas.faerber@web.de> 
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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 <errno.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#ifdef __sun__
+#include <sys/ioccom.h>
+#endif
 #include <ctype.h>
 #include <inttypes.h>
 #include <sys/socket.h>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-02  1:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-02  1:57 [Qemu-devel] [4982] Fix compilation of nbd on Solaris (Andreas Faerber) Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).