updates.
[silc.git] / lib / silcutil / unix / silcunixnet.c
index de1b1e339f9e5db90238f24ca8462797fa194322..217b4bd04fac0540c0287f6ac5dd0090efed7a3b 100644 (file)
@@ -136,7 +136,9 @@ int silc_net_create_connection(int port, char *host)
   }
 
   /* Set appropriate options */
+#if defined(TCP_NODELAY)
   silc_net_set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1);
+#endif
   silc_net_set_socket_opt(sock, SOL_SOCKET, SO_KEEPALIVE, 1);
 
   SILC_LOG_DEBUG(("Connection created"));
@@ -193,7 +195,9 @@ int silc_net_create_connection_async(int port, char *host)
   }
 
   /* Set appropriate options */
+#if defined(TCP_NODELAY)
   silc_net_set_socket_opt(sock, IPPROTO_TCP, TCP_NODELAY, 1);
+#endif
   silc_net_set_socket_opt(sock, SOL_SOCKET, SO_KEEPALIVE, 1);
 
   SILC_LOG_DEBUG(("Connection operation in progress"));