[PATCH] getdomainname should be usable on SunOS with -lnsl
[gitweb.git] / Makefile
index e8421ccc2de4e8aecd0ea8e56b12f1a8bd2c8c7b..0e9f2ec4aaf0dfb9b1d214e9e74277ea8c0458cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,9 @@ PROGRAMS = \
        git-upload-pack git-verify-pack git-write-tree \
        $(SIMPLE_PROGRAMS)
 
+# Backward compatibility -- to be removed in 0.99.8
+PROGRAMS += git-ssh-pull git-ssh-push
+
 PYMODULES = \
        gitMergeCommon.py
 
@@ -148,7 +151,8 @@ ifeq ($(shell uname -s),Darwin)
 endif
 ifeq ($(shell uname -s),SunOS)
        NEEDS_SOCKET = YesPlease
-       PLATFORM_DEFINES += -DNO_GETDOMAINNAME=1
+       NEEDS_NSL = YesPlease
+       PLATFORM_DEFINES += -D__EXTENSIONS__
 endif
 
 ifndef SHELL_PATH
@@ -195,6 +199,10 @@ ifdef NEEDS_SOCKET
        LIBS += -lsocket
        SIMPLE_LIB += -lsocket
 endif
+ifdef NEEDS_NSL
+       LIBS += -lnsl
+       SIMPLE_LIB += -lnsl
+endif
 
 DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
 
@@ -250,6 +258,8 @@ git-http-fetch: fetch.o
 git-local-fetch: fetch.o
 git-ssh-fetch: rsh.o fetch.o
 git-ssh-upload: rsh.o
+git-ssh-pull: rsh.o fetch.o
+git-ssh-push: rsh.o
 
 git-http-fetch: LIBS += -lcurl
 git-rev-list: LIBS += $(OPENSSL_LIBSSL)