aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-08-06 14:57:18 +0200
committerLukas Larsson <[email protected]>2014-08-06 14:57:18 +0200
commitf3220cea004a277b477b0f53cc35ab8122a53792 (patch)
tree8e8c4a85801f88585d4f5f1af6e972522cc0a810
parent805f5312d9e1e4f9f382de3d30265802d63760ee (diff)
parent6e3f09186e0a5e89eb729840f71e2a73684e9b50 (diff)
downloadotp-f3220cea004a277b477b0f53cc35ab8122a53792.tar.gz
otp-f3220cea004a277b477b0f53cc35ab8122a53792.tar.bz2
otp-f3220cea004a277b477b0f53cc35ab8122a53792.zip
Merge branch 'lukas/erts/fd_bind_tc_fix/OTP-12061' into maint
* lukas/erts/fd_bind_tc_fix/OTP-12061: erts: Fix tc and docs after {fd,FD} bind change
-rw-r--r--erts/emulator/test/driver_SUITE.erl3
-rw-r--r--lib/kernel/doc/src/gen_udp.xml7
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src1
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE_data/gen_tcp_api_SUITE.c3
4 files changed, 9 insertions, 5 deletions
diff --git a/erts/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl
index c62bc0c454..344bde7c91 100644
--- a/erts/emulator/test/driver_SUITE.erl
+++ b/erts/emulator/test/driver_SUITE.erl
@@ -1062,10 +1062,9 @@ otp_6602(Config) when is_list(Config) ->
%% Inet driver use port locking...
{ok, S} = gen_udp:open(0),
{ok, Fd} = inet:getfd(S),
- {ok, Port} = inet:port(S),
%% Steal fd (lock checker used to
%% trigger here).
- {ok, _S2} = gen_udp:open(Port,[{fd,Fd}]),
+ {ok, _S2} = gen_udp:open(0,[{fd,Fd}]),
Parent ! Done
end),
?line receive Done -> ok end,
diff --git a/lib/kernel/doc/src/gen_udp.xml b/lib/kernel/doc/src/gen_udp.xml
index 503725fe18..291d1b0da7 100644
--- a/lib/kernel/doc/src/gen_udp.xml
+++ b/lib/kernel/doc/src/gen_udp.xml
@@ -84,7 +84,12 @@
<item>
<p>If a socket has somehow been opened without using
<c>gen_udp</c>, use this option to pass the file
- descriptor for it.</p>
+ descriptor for it. If <c><anno>Port</anno></c> is not set to 0
+ and/or <c>{ip, ip_address()}</c> is combined with this option
+ the fd will be bound to the given interface and port after being
+ opened. If these options are not given it is assumed that the fd
+ is already bound appropriately.
+ </p>
</item>
<tag><c>inet6</c></tag>
<item>
diff --git a/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src b/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src
index b6027de0d7..5477598160 100644
--- a/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src
+++ b/lib/kernel/test/gen_tcp_api_SUITE_data/Makefile.src
@@ -1,5 +1,6 @@
NIF_LIBS = gen_tcp_api_SUITE@dll@
+SHLIB_EXTRA_LDLIBS = @LIBS@
all: $(NIF_LIBS)
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 6be7838363..73a6568b30 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
@@ -22,13 +22,12 @@
#include <string.h>
#include <assert.h>
#include <limits.h>
-#include <sys/socket.h>
#include <sys/types.h>
#ifdef __WIN32__
#include <winsock2.h>
#else
-
+#include <sys/socket.h>
#endif
#define sock_open(af, type, proto) socket((af), (type), (proto))