* [Qemu-devel] [PATCH] Fix compilation of nbd on Solaris
@ 2008-08-01 21:06 Andreas Färber
2008-08-02 1:58 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Färber @ 2008-08-01 21:06 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
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>
Andreas
[-- Attachment #2: qemu-solaris-nbd.diff --]
[-- Type: application/octet-stream, Size: 574 bytes --]
diff --git a/Makefile b/Makefile
index fcf8a58..0472e16 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,10 @@ endif
LIBS+=$(AIOLIBS)
+ifdef CONFIG_SOLARIS
+LIBS+=-lsocket -lnsl -lresolv
+endif
+
all: $(TOOLS) $(DOCS) recurse-all
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
diff --git a/nbd.c b/nbd.c
index e9308ee..9bebe4a 100644
--- a/nbd.c
+++ b/nbd.c
@@ -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>
[-- Attachment #3: Type: text/plain, Size: 3 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix compilation of nbd on Solaris
2008-08-01 21:06 [Qemu-devel] [PATCH] Fix compilation of nbd on Solaris Andreas Färber
@ 2008-08-02 1:58 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2008-08-02 1:58 UTC (permalink / raw)
To: qemu-devel
Andreas Färber wrote:
> 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>
Applied. Thanks.
Your mailer attached the patch as 'application/octet-stream'. In the
future, it would be better it you could also inline the patch or better
yet, attach it as 'text/plain'. That allows for easier commenting for
more complex patches.
Regards,
Anthony Liguori
> Andreas
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-02 1:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 21:06 [Qemu-devel] [PATCH] Fix compilation of nbd on Solaris Andreas Färber
2008-08-02 1:58 ` 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).