aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-07-24 17:04:46 +0200
committerHenrik Nord <[email protected]>2014-07-24 17:09:03 +0200
commit7de69a943ebf3be3fc9b8b4f79bba2819107e1ab (patch)
tree3bd523f78022cf457c41da02999abf0029b47f60 /erts/preloaded
parent6cae32f48905328561f28fe9eed1a4f18bbf1bd0 (diff)
parent1b9383a8dbc03473860dfaacc7a02fbc8b1b1185 (diff)
downloadotp-7de69a943ebf3be3fc9b8b4f79bba2819107e1ab.tar.gz
otp-7de69a943ebf3be3fc9b8b4f79bba2819107e1ab.tar.bz2
otp-7de69a943ebf3be3fc9b8b4f79bba2819107e1ab.zip
Merge branch 'maint'
Conflicts: erts/preloaded/ebin/prim_inet.beam
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin72912 -> 73128 bytes
-rw-r--r--erts/preloaded/src/prim_inet.erl9
2 files changed, 7 insertions, 2 deletions
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index fe5431c5ff..f58ee4b4d5 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index 143c718130..79ff013c77 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -25,7 +25,7 @@
%% Primitive inet_drv interface
--export([open/3, open/4, fdopen/4, close/1]).
+-export([open/3, open/4, fdopen/4, fdopen/5, close/1]).
-export([bind/3, listen/1, listen/2, peeloff/2]).
-export([connect/3, connect/4, async_connect/4]).
-export([accept/1, accept/2, async_accept/2]).
@@ -70,7 +70,12 @@ open(Protocol, Family, Type, Opts) ->
open(Protocol, Family, Type, Opts, ?INET_REQ_OPEN, []).
fdopen(Protocol, Family, Type, Fd) when is_integer(Fd) ->
- open(Protocol, Family, Type, [], ?INET_REQ_FDOPEN, ?int32(Fd)).
+ fdopen(Protocol, Family, Type, Fd, true).
+
+fdopen(Protocol, Family, Type, Fd, Bound)
+ when is_integer(Fd), Bound == true orelse Bound == false ->
+ open(Protocol, Family, Type, [], ?INET_REQ_FDOPEN,
+ [?int32(Fd), enc_value_2(bool, Bound)]).
open(Protocol, Family, Type, Opts, Req, Data) ->
Drv = protocol2drv(Protocol),