qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [4982] Fix compilation of nbd on Solaris (Andreas Faerber)


From: Anthony Liguori
Subject: [Qemu-devel] [4982] Fix compilation of nbd on Solaris (Andreas Faerber)
Date: Sat, 02 Aug 2008 01:57:03 +0000

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 <address@hidden> 
Signed-off-by: Anthony Liguori <address@hidden>

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>






reply via email to

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