Index: src/main.c
===================================================================
RCS file: /cvsroot/curl/curl/src/main.c,v
retrieving revision 1.440
diff -U 3 -r1.440 main.c
--- src/main.c	2 Jan 2008 21:40:12 -0000	1.440
+++ src/main.c	4 Jan 2008 18:37:50 -0000
@@ -1444,6 +1444,11 @@
   case CURLSOCKTYPE_IPCXN:
     if(setsockopt(curlfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&onoff,
                   sizeof(onoff)) < 0) {
+      if(ENOPROTOOPT == SOCKERRNO) {
+        /* Don't fail if SO_KEEPALIVE is not supported by the protocol */
+        SET_SOCKERRNO(0);
+        return 0;
+      }
       warnf(clientp, "Could not set SO_KEEPALIVE!\n");
       return 1;
     }
