diff options
author | Sverker Eriksson <[email protected]> | 2018-04-20 11:35:57 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-04-20 11:35:57 +0200 |
commit | fd8ce7e0592b4d873773dba405de9cfd4e4ec184 (patch) | |
tree | fc306c1534b6c44440766c24f246ee1a873f1401 /lib/erl_interface/src/connect/ei_resolve.c | |
parent | e6b1a75be4e5703bae448e55215fec47bb161eaa (diff) | |
parent | 3c8c8158de1b0f1880d588c1169be6a2f727c379 (diff) | |
download | otp-fd8ce7e0592b4d873773dba405de9cfd4e4ec184.tar.gz otp-fd8ce7e0592b4d873773dba405de9cfd4e4ec184.tar.bz2 otp-fd8ce7e0592b4d873773dba405de9cfd4e4ec184.zip |
Merge branch 'sverker/erl_interface/ei_connect-erange-fix/OTP-15022'
Diffstat (limited to 'lib/erl_interface/src/connect/ei_resolve.c')
-rw-r--r-- | lib/erl_interface/src/connect/ei_resolve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c index fd0c659373..2757735d39 100644 --- a/lib/erl_interface/src/connect/ei_resolve.c +++ b/lib/erl_interface/src/connect/ei_resolve.c @@ -645,8 +645,11 @@ struct hostent *ei_gethostbyname_r(const char *name, #else #if (defined(__GLIBC__) || defined(__linux__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) struct hostent *result; + int err; - gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop); + err = gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop); + if (err == ERANGE) + *h_errnop = err; return result; #else |