Merge in fix for send() on linux.
authorBrian Aker <brian@tangent.org>
Mon, 21 Feb 2011 10:33:09 +0000 (02:33 -0800)
committerBrian Aker <brian@tangent.org>
Mon, 21 Feb 2011 10:33:09 +0000 (02:33 -0800)
libmemcached/io.c

index e94c136f0c5785c9886f8cd18b2884beb5502b6e..d3c5e4b6546e6b040d231c7536b9f22db608db2f 100644 (file)
@@ -619,7 +619,11 @@ static ssize_t io_flush(memcached_server_write_instance_st ptr,
       increment_udp_message_id(ptr);
 
     WATCHPOINT_ASSERT(ptr->fd != -1);
+#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
     sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
+#else
+    sent_length= send(ptr->fd, local_write_ptr, write_length, MSG_NOSIGNAL|MSG_DONTWAIT);
+#endif
     if (sent_length == SOCKET_ERROR)
     {
       ptr->cached_errno= get_socket_errno();