sphinx-1.10-fix_nosigpipe.patch 627 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# http://www.sphinxsearch.com/bugs/view.php?id=550
# 0000550: Can not make libsphinxclient

--- sphinx-1.10-beta/api/libsphinxclient/sphinxclient.c	2010-07-15 13:05:40.000000000 +0200
+++ sphinx-1.10-beta/api/libsphinxclient/sphinxclient.c	2010-07-21 20:43:26.760024489 +0200
@@ -1355,11 +1355,13 @@
 
 	optval = 1;
 #ifndef _WIN32
+  #ifdef SO_NOSIGPIPE
 	if ( setsockopt ( sock, SOL_SOCKET, SO_NOSIGPIPE, (void *)&optval, (socklen_t)sizeof(optval) ) < 0 )
 	{
 		set_error ( client, "setsockopt() failed: %s", sock_error() );
 		return -1;
 	}
+  #endif
 #endif
 
 	res = connect ( sock, (struct sockaddr*)&sa, sizeof(sa) );