You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/sphinx/files/sphinx-2.0.1_beta-solaris.p...

36 lines
1.0 KiB

link against required libraries
include sys/fcntl.h for F_[SG]ET constants
don't try to use an undefined constant
--- api/libsphinxclient/configure.in
+++ api/libsphinxclient/configure.in
@@ -33,6 +33,9 @@
dnl Checks for header files.
AC_CHECK_HEADERS(string.h strings.h unistd.h stdint.h)
+AC_CHECK_LIB([nsl], gethostbyname)
+AC_CHECK_LIB([socket], connect)
+
DEFAULT_INSTALL_PREFIX="/usr/local"
AC_ARG_ENABLE(debug,
--- api/libsphinxclient/sphinxclient.c
+++ api/libsphinxclient/sphinxclient.c
@@ -57,6 +57,7 @@
#include <netdb.h>
#include <errno.h>
#include <sys/un.h>
+ #include <sys/fcntl.h>
#endif
//////////////////////////////////////////////////////////////////////////
@@ -1280,7 +1281,7 @@
static sphinx_bool net_write ( int fd, const char * bytes, int len, sphinx_client * client )
{
int res;
-#if defined(_WIN32) || defined(SO_NOSIGPIPE)
+#if defined(_WIN32) || defined(SO_NOSIGPIPE) || !defined(MSG_NOSIGNAL)
res = send ( fd, bytes, len, 0 );
#else
res = send ( fd, bytes, len, MSG_NOSIGNAL );