Fix macro for Linux
authorBrian Aker <brian@gaz>
Thu, 22 Apr 2010 23:42:25 +0000 (16:42 -0700)
committerBrian Aker <brian@gaz>
Thu, 22 Apr 2010 23:42:25 +0000 (16:42 -0700)
libmemcached/connect.c

index 125d7b0ab1b4adc842492284a3d11b67d755a1f3..8d0e0a9b389982372588860cefa5cddbb26f2a39 100644 (file)
@@ -106,6 +106,7 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
 #endif
 
 
+#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
   {
     int set = 1;
     int error= setsockopt(ptr->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
@@ -117,6 +118,7 @@ static memcached_return_t set_socket_options(memcached_server_st *ptr)
       perror("setsockopt(SO_NOSIGPIPE)");
     }
   }
+#endif
 
   if (ptr->root->flags.no_block)
   {