Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
50 lines
1.4 KiB
Diff
50 lines
1.4 KiB
Diff
Add missing return types to avoid build failures with C99 compilers.
|
|
Include <string.h> to avoid implicit function declarations.
|
|
|
|
Partially fixed via:
|
|
|
|
commit da41e452c5acc99ffe40f48be32d9ca7e55c407c
|
|
Author: tomat <tomat@406a0c4d-033a-0410-8de8-e80135713968>
|
|
Date: Wed Jun 2 05:16:06 2010 +0000
|
|
|
|
fixed query buffer overrun and SIGPIPE in C API, mantis bug 489 \ 504
|
|
|
|
git-svn-id: svn://svn.sphinxsearch.com/sphinx/trunk@2316 406a0c4d-033a-0410-
|
|
8de8-e80135713968
|
|
|
|
Rest submitted upstream: <https://github.com/sphinxsearch/sphinx/pull/47>
|
|
|
|
diff --git a/api/libsphinxclient/sphinxclient.c b/api/libsphinxclient/sphinxclient.c
|
|
index 16f7913fa37b3bf3..0530fc2c65f1082c 100644
|
|
--- a/api/libsphinxclient/sphinxclient.c
|
|
+++ b/api/libsphinxclient/sphinxclient.c
|
|
@@ -311,7 +311,7 @@ static void sphinx_free_results ( sphinx_client * client )
|
|
}
|
|
|
|
|
|
-static sock_close ( int sock );
|
|
+static void sock_close ( int sock );
|
|
|
|
|
|
#define safe_free(_ptr) \
|
|
@@ -1436,7 +1436,7 @@ static int sock_set_blocking ( int sock )
|
|
}
|
|
|
|
|
|
-static sock_close ( int sock )
|
|
+static void sock_close ( int sock )
|
|
{
|
|
if ( sock<0 )
|
|
return;
|
|
diff --git a/api/libsphinxclient/test.c b/api/libsphinxclient/test.c
|
|
index f779bb1ff638a179..a4806ea9aca9c82c 100644
|
|
--- a/api/libsphinxclient/test.c
|
|
+++ b/api/libsphinxclient/test.c
|
|
@@ -16,6 +16,7 @@
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
+#include <string.h>
|
|
|
|
#if _WIN32
|
|
#include <winsock2.h>
|