Merged changes made to HEAD branch. unlabeled-3.19.22
authorcls%seawood.org
Sun, 12 Sep 1999 01:09:31 +0000
branchunlabeled-3.19.22
changeset 805 137f46046878ccee245cd44a64e749aa8e1054f1
parent 581 820017031a3775c5f7bd10155d835c2180ff7c35
push idunknown
push userunknown
push dateunknown
Merged changes made to HEAD branch.
pr/src/io/prsocket.c
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -1186,17 +1186,21 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRIn
 		return NULL;
 	}
 	osfd = _PR_MD_SOCKET(domain, type, proto);
 	if (osfd == -1) {
 		return 0;
 	}
 #ifdef HAVE_SOCKET_KEEPALIVE
 	/* "Keep-alive" packets are specific to TCP. */
-	if (domain == AF_INET && type == SOCK_STREAM) {
+	if ((domain == AF_INET
+#if defined(_PR_INET6)
+			|| domain == AF_INET6
+#endif
+			) && type == SOCK_STREAM) {
 		if (setsockopt(osfd, (int)SOL_SOCKET, SO_KEEPALIVE,
 #ifdef XP_OS2_VACPP
             (char *)&one, sizeof(one) ) < 0) {
 #else
 		    (const void *) &one, sizeof(one) ) < 0) {
 #endif
 			_PR_MD_CLOSE_SOCKET(osfd);
 			return 0;