Fix build for HP-UX and older Solaris: (un)setenv. Bug 1578
[exim.git] / src / src / smtp_out.c
index c55b29254069cbef0b0aa812d7bde3555d36a862..06bc1dfd3b097c2521d69e065c7b2a3895ce0515 100644 (file)
@@ -165,7 +165,9 @@ if ((sock = ip_socket(SOCK_STREAM, host_af)) < 0) return -1;
 
 /* Set TCP_NODELAY; Exim does its own buffering. */
 
-setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (uschar *)(&on), sizeof(on));
+if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, US &on, sizeof(on)))
+  HDEBUG(D_transport|D_acl|D_v)
+    debug_printf("failed to set NODELAY: %s ", strerror(errno));
 
 /* Set DSCP value, if we can. For now, if we fail to set the value, we don't
 bomb out, just log it and continue in default traffic class. */