diff options
author | Rickard Green <[email protected]> | 2019-02-06 16:02:43 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-02-06 16:02:43 +0100 |
commit | 260935595647eb2c4ca94c4c853c2b6065610272 (patch) | |
tree | 525644c57692fc2422c6cbf8f3e31647590007ed /lib/erl_interface/src/misc/ei_portio.c | |
parent | 3542afbdc4909455ad9e45e2b5328835a838a1bd (diff) | |
parent | 2a1dab38c8a2186a7413eabb2035234cb66f367f (diff) | |
download | otp-260935595647eb2c4ca94c4c853c2b6065610272.tar.gz otp-260935595647eb2c4ca94c4c853c2b6065610272.tar.bz2 otp-260935595647eb2c4ca94c4c853c2b6065610272.zip |
Merge branch 'maint'
* maint:
Introduce ei_init()
Fix bug in ei_accept_tmo
Fix build of erl_interface on BSD
Diffstat (limited to 'lib/erl_interface/src/misc/ei_portio.c')
-rw-r--r-- | lib/erl_interface/src/misc/ei_portio.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/erl_interface/src/misc/ei_portio.c b/lib/erl_interface/src/misc/ei_portio.c index 726b1af82d..bccc86c1b1 100644 --- a/lib/erl_interface/src/misc/ei_portio.c +++ b/lib/erl_interface/src/misc/ei_portio.c @@ -19,6 +19,9 @@ * */ + +#include "eidef.h" + #ifdef __WIN32__ #include <winsock2.h> #include <windows.h> @@ -47,10 +50,8 @@ static unsigned long param_one = 1; #include <taskLib.h> #include <inetLib.h> #include <selectLib.h> -#include <sys/types.h> #include <ioLib.h> #include <unistd.h> -#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> @@ -65,7 +66,6 @@ static unsigned long param_one = 1; #else /* other unix */ #include <stdlib.h> -#include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <fcntl.h> @@ -86,6 +86,7 @@ static unsigned long param_one = 1; /* common includes */ +#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -94,7 +95,9 @@ static unsigned long param_one = 1; #else #include <time.h> #endif -#include "eidef.h" +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif #include "ei_portio.h" #include "ei_internal.h" @@ -246,7 +249,7 @@ static int tcp_accept(void **ctx, void *addr, int *len, unsigned unused) if (res) return res; - res = accept(fd, (struct sockaddr*) &addr, &addr_len); + res = accept(fd, (struct sockaddr*) addr, &addr_len); if (MEANS_SOCKET_ERROR(res)) return get_error(); |