From c3281858e4b838d452854bea8542746eddd776c3 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Mon, 21 Feb 2011 02:33:09 -0800 Subject: [PATCH] Merge in fix for send() on linux. --- libmemcached/io.c | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.30.2