diff options
Diffstat (limited to 'lib/erl_interface')
-rw-r--r-- | lib/erl_interface/src/connect/ei_connect.c | 4 | ||||
-rw-r--r-- | lib/erl_interface/src/connect/ei_resolve.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index 3175d1bdfd..2e8418d61e 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -1166,7 +1166,11 @@ static unsigned int gen_challenge(void) uname(&s.name); s.cpu = clock(); s.pid = getpid(); +#ifndef __ANDROID__ s.hid = gethostid(); +#else + s.hid = 0; +#endif s.uid = getuid(); s.gid = getgid(); diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c index 74dcba61a7..cffcac801c 100644 --- a/lib/erl_interface/src/connect/ei_resolve.c +++ b/lib/erl_interface/src/connect/ei_resolve.c @@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const char *name, #ifndef HAVE_GETHOSTBYNAME_R return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop); #else -#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__)) +#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) struct hostent *result; gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop); |