[PATCH] getdomainname should be usable on SunOS with -lnsl
[gitweb.git] / Makefile
index b48fe44b384680fa2400c4963cb50371a3310ef1..0e9f2ec4aaf0dfb9b1d214e9e74277ea8c0458cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -151,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
@@ -198,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)'