summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--nbd.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index fcf8a5820f..0472e169c6 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 e9308ee042..9bebe4a9bb 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>