solaris: ensure that TCP_NODELAY gets picked up
authorJens Axboe <axboe@kernel.dk>
Thu, 28 Feb 2013 19:34:31 +0000 (20:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 Feb 2013 19:34:31 +0000 (20:34 +0100)
Use proper libs when linking, then we can also remove
those from the Makefile.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
configure

index bb345ed9899bf7ca44b8ffa646e3e026ffe213ff..d55626d2576b834b333bd50a2c9e7d1e05739e3b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,7 @@ ifeq ($(UNAME), Android)
   LDFLAGS += -rdynamic
 endif
 ifeq ($(UNAME), SunOS)
   LDFLAGS += -rdynamic
 endif
 ifeq ($(UNAME), SunOS)
-  LIBS  += -lpthread -ldl -laio -lrt -lnsl -lsocket
+  LIBS  += -lpthread -ldl
   CPPFLAGS += -D__EXTENSIONS__
 endif
 ifeq ($(UNAME), FreeBSD)
   CPPFLAGS += -D__EXTENSIONS__
 endif
 ifeq ($(UNAME), FreeBSD)
index 1a5295a1e77db62fc33c87933096b68905918ee4..8f8674980df1318ba59b76c9bffebd486dc9df11 100755 (executable)
--- a/configure
+++ b/configure
@@ -906,6 +906,9 @@ int main(int argc, char **argv)
 EOF
 if compile_prog "" "" "TCP_NODELAY"; then
   tcp_nodelay="yes"
 EOF
 if compile_prog "" "" "TCP_NODELAY"; then
   tcp_nodelay="yes"
+elif compile_prog "" "-lnsl -lsocket" "TCP_NODELAY"; then
+  tcp_nodelay="yes"
+  LIBS="-lnsl -lsocket $LIBS" 
 fi
 echo "TCP_NODELAY                   $tcp_nodelay"
 
 fi
 echo "TCP_NODELAY                   $tcp_nodelay"