BSD portability enhancements (bug #234)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-09-08 16:48:07 +00:00
parent 1e19f72077
commit 479a67e629
35 changed files with 93 additions and 62 deletions

View File

@@ -13,9 +13,9 @@
#include <string.h>
#include <sys/select.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#define AUDIO_FILENO (STDERR_FILENO + 1)
@@ -44,7 +44,7 @@ static int connect_sphinx(void)
sin.sin_family = AF_INET;
sin.sin_port = htons(SPHINX_PORT);
memcpy(&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
if (connect(sphinx_sock, &sin, sizeof(sin))) {
if (connect(sphinx_sock, (struct sockaddr *)&sin, sizeof(sin))) {
fprintf(stderr, "Unable to connect on socket: %s\n", strerror(errno));
close(sphinx_sock);
sphinx_sock = -1;