forked from enlightenment/efl
Ecore ecore_con:
* include arpa/inet.h if it is detected * use correct types * small cleanup SVN revision: 57503
This commit is contained in:
parent
e625aefa08
commit
f2247fb7e3
|
@ -381,7 +381,7 @@ error:
|
|||
if (svr->path)
|
||||
free(svr->path);
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
if (svr->fd_handler)
|
||||
ecore_main_fd_handler_del(svr->fd_handler);
|
||||
|
||||
|
@ -394,7 +394,6 @@ error:
|
|||
if (svr->ip)
|
||||
eina_stringshare_del(svr->ip);
|
||||
|
||||
#endif
|
||||
ecore_con_ssl_server_shutdown(svr);
|
||||
free(svr);
|
||||
return NULL;
|
||||
|
@ -1852,7 +1851,7 @@ svr_try_connect_plain(Ecore_Con_Server *svr)
|
|||
{
|
||||
int res;
|
||||
int so_err = 0;
|
||||
unsigned int size = sizeof(int);
|
||||
socklen_t size = sizeof(int);
|
||||
|
||||
res = getsockopt(svr->fd, SOL_SOCKET, SO_ERROR, (void *)&so_err, &size);
|
||||
#ifdef _WIN32
|
||||
|
@ -2161,7 +2160,7 @@ _ecore_con_svr_udp_handler(void *data,
|
|||
{
|
||||
unsigned char buf[READBUFSIZ];
|
||||
unsigned char client_addr[256];
|
||||
unsigned int client_addr_len = sizeof(client_addr);
|
||||
socklen_t client_addr_len = sizeof(client_addr);
|
||||
int num;
|
||||
Ecore_Con_Server *svr;
|
||||
Ecore_Con_Client *cl = NULL;
|
||||
|
@ -2183,7 +2182,7 @@ _ecore_con_svr_udp_handler(void *data,
|
|||
#ifdef _WIN32
|
||||
num = fcntl(svr->fd, F_SETFL, O_NONBLOCK);
|
||||
if (num >= 0)
|
||||
num = recvfrom(svr->fd, buf, sizeof(buf), 0,
|
||||
num = recvfrom(svr->fd, (char *)buf, sizeof(buf), 0,
|
||||
(struct sockaddr *)&client_addr,
|
||||
&client_addr_len);
|
||||
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <ares.h>
|
||||
|
||||
#include "Ecore.h"
|
||||
|
@ -63,7 +67,7 @@ static Eina_Bool _ecore_con_info_cares_timeout_cb(void *data);
|
|||
|
||||
static void
|
||||
_ecore_con_info_cares_state_cb(void *data,
|
||||
int fd,
|
||||
ares_socket_t fd,
|
||||
int read,
|
||||
int write);
|
||||
static int
|
||||
|
@ -347,7 +351,7 @@ _ecore_con_info_fds_search(const Ecore_Con_FD *fd1,
|
|||
|
||||
static void
|
||||
_ecore_con_info_cares_state_cb(void *data __UNUSED__,
|
||||
int fd,
|
||||
ares_socket_t fd,
|
||||
int read,
|
||||
int write)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue