diff options
author | Lukas Larsson <[email protected]> | 2014-11-05 15:16:35 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-11-05 15:16:35 +0100 |
commit | 965187787f603181aadbe5effdbb8fa6dc90b9ac (patch) | |
tree | 1db4e50f0dd8ca32ddfab3e39d70776b9b241329 /lib/kernel | |
parent | 509163307c31bf4f98a638b47ee03a5b99eb2c73 (diff) | |
parent | a5bfb0a58783c472887ce0ad2060e4a395aa941d (diff) | |
download | otp-965187787f603181aadbe5effdbb8fa6dc90b9ac.tar.gz otp-965187787f603181aadbe5effdbb8fa6dc90b9ac.tar.bz2 otp-965187787f603181aadbe5effdbb8fa6dc90b9ac.zip |
Merge branch 'lukas/erts/fdopen_non_bound_win32_fix/OTP-12289' into maint
* lukas/erts/fdopen_non_bound_win32_fix/OTP-12289:
erts: getsockname is not allowed on non-bound sockets
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c b/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c index 73a6568b30..d774767624 100644 --- a/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c +++ b/lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c @@ -26,8 +26,10 @@ #ifdef __WIN32__ #include <winsock2.h> +#define sock_close(s) closesocket(s) #else #include <sys/socket.h> +#define sock_close(s) close(s) #endif #define sock_open(af, type, proto) socket((af), (type), (proto)) @@ -46,7 +48,7 @@ static ERL_NIF_TERM closesockfd(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg enif_get_int(env, argv[0], &fd); - close(fd); + sock_close(fd); return enif_make_int(env, fd); } |