diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/socket.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index ce8a4f38d8b5..c8186864e5cd 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -961,7 +961,10 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) if (sin->sin_addr.s_addr == htonl(INADDR_ANY)) return ((oslHostAddr)NULL); - he= gethostbyaddr(&sin->sin_addr, + char const * addr = reinterpret_cast<char const *>(&sin->sin_addr); + // at least some Androids apparently have a gethostbyaddr with char* + // instead of void* argument + he= gethostbyaddr(addr, sizeof (sin->sin_addr), sin->sin_family); return _osl_hostentToHostAddr (he); |