diff options
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/net.beam | bin | 5892 -> 5980 bytes | |||
-rw-r--r-- | erts/preloaded/src/net.erl | 8 |
2 files changed, 5 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/net.beam b/erts/preloaded/ebin/net.beam Binary files differindex c83cafe209..66391317a2 100644 --- a/erts/preloaded/ebin/net.beam +++ b/erts/preloaded/ebin/net.beam diff --git a/erts/preloaded/src/net.erl b/erts/preloaded/src/net.erl index 823f11e2b8..29739f4510 100644 --- a/erts/preloaded/src/net.erl +++ b/erts/preloaded/src/net.erl @@ -206,18 +206,20 @@ gethostname() -> getnameinfo(SockAddr) when is_record(SockAddr, in4_sockaddr) orelse is_record(SockAddr, in6_sockaddr) -> - getnameinfo(SockAddr, []). + getnameinfo(SockAddr, undefined). -spec getnameinfo(SockAddr, Flags) -> {ok, Info} | {error, Reason} when SockAddr :: in_sockaddr(), - Flags :: name_info_flags(), + Flags :: name_info_flags() | undefined, Info :: name_info(), Reason :: term(). +getnameinfo(SockAddr, [] = _Flags) -> + getnameinfo(SockAddr, undefined); getnameinfo(SockAddr, Flags) when (is_record(SockAddr, in4_sockaddr) orelse is_record(SockAddr, in6_sockaddr)) andalso - is_list(Flags) -> + (is_list(Flags) orelse (Flags =:= undefined)) -> nif_getnameinfo(SockAddr, Flags). |