diff options
author | Rickard Green <[email protected]> | 2019-02-06 16:02:04 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-02-06 16:02:04 +0100 |
commit | 2a1dab38c8a2186a7413eabb2035234cb66f367f (patch) | |
tree | 74152f431d68ca679eb1156e98136e53249b7d87 /lib/erl_interface/src/misc/ei_portio.c | |
parent | b01083b47699f0494053abfbe7ae1f50142b1b49 (diff) | |
parent | 320a02e522085fe5eec141d7bf18631e4ef74f0a (diff) | |
download | otp-2a1dab38c8a2186a7413eabb2035234cb66f367f.tar.gz otp-2a1dab38c8a2186a7413eabb2035234cb66f367f.tar.bz2 otp-2a1dab38c8a2186a7413eabb2035234cb66f367f.zip |
Merge branch 'rickard/ei-ext-maint/OTP-15442' into maint
* rickard/ei-ext-maint/OTP-15442:
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(); |