From: Cedric Bail Date: Fri, 15 Mar 2013 08:12:05 +0000 (+0100) Subject: ecore_con: improve portability. X-Git-Tag: submit/devel/efl/20131022.203902~1593 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=195989872402b624fd11b00f2a9a28116512fac5;p=platform%2Fupstream%2Fefl.git ecore_con: improve portability. --- diff --git a/configure.ac b/configure.ac index 6e63ad8..e7f77bb 100644 --- a/configure.ac +++ b/configure.ac @@ -1786,12 +1786,19 @@ EFL_EVAL_PKGS([ECORE]) AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([sys/socket.h]) + AC_CHECK_HEADERS([ \ +arpa/inet.h \ langinfo.h \ features.h \ +net/if.h \ +netinet/in.h \ +netinet/tcp.h \ sys/prctl.h \ sys/resource.h \ sys/timerfd.h \ +sys/un.h \ ]) ### Checks for types diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index 3947e7e..c2a31d5 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -9,11 +9,26 @@ #include #include #include -#include -#include -#include -#include + +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_NETINET_TCP_H +# include +#endif + +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_ARPA_INET_H +# include +#endif + +#ifdef HAVE_SYS_UN_H #include +#endif #ifdef HAVE_SYSTEMD # include diff --git a/src/lib/ecore_con/ecore_con_ares.c b/src/lib/ecore_con/ecore_con_ares.c index 2251a58..3c0ca22 100644 --- a/src/lib/ecore_con/ecore_con_ares.c +++ b/src/lib/ecore_con/ecore_con_ares.c @@ -11,8 +11,14 @@ #include #include -#include -#include + +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_ARPA_INET_H +# include +#endif #include diff --git a/src/lib/ecore_con/ecore_con_socks.c b/src/lib/ecore_con/ecore_con_socks.c index 4964cdd..0c16131 100644 --- a/src/lib/ecore_con/ecore_con_socks.c +++ b/src/lib/ecore_con/ecore_con_socks.c @@ -10,12 +10,29 @@ #include #include -#include -#include -#include -#include +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_NETINET_TCP_H +# include +#endif + +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_ARPA_INET_H +# include +#endif + +#ifdef HAVE_SYS_UN_H #include -#include +#endif + +#ifdef HAVE_NET_IF_H +# include +#endif #ifdef HAVE_WS2TCPIP_H # include @@ -30,6 +47,10 @@ #include "Ecore_Con.h" #include "ecore_con_private.h" +#if defined(_WIN32) && !defined(IF_NAMESIZE) +#define IF_NAMESIZE 16 +#endif + /* http://tools.ietf.org/html/rfc1928 o X'00' NO AUTHENTICATION REQUIRED o X'01' GSSAPI diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c index fa43c1d..6affc82 100644 --- a/src/lib/ecore_ipc/ecore_ipc.c +++ b/src/lib/ecore_ipc/ecore_ipc.c @@ -4,7 +4,10 @@ #include #include -#include + +#ifdef HAVE_NETINET_IN_H +# include +#endif #ifdef HAVE_WINSOCK2_H # include