From: Brian Aker Date: Mon, 21 Feb 2011 10:33:09 +0000 (-0800) Subject: Merge in fix for send() on linux. X-Git-Tag: 0.51~36 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c3281858e4b838d452854bea8542746eddd776c3;p=awesomized%2Flibmemcached Merge in fix for send() on linux. --- diff --git a/libmemcached/io.c b/libmemcached/io.c index e94c136f..d3c5e4b6 100644 --- a/libmemcached/io.c +++ b/libmemcached/io.c @@ -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();