Unify DNS error code for android_gethostbyaddrfornetcontext

Both gethostbyname and getaddrinfo return error code POSIX EAI_* now. Unify
the error codes of gethostbyaddr to be POSIX EAI_* as well.

Test: system/netd/tests/runtests.sh passed
Change-Id: Iee6963e2ebd21fd0c446b487784eb59af37a544e
diff --git a/resolv/include/netd_resolv/resolv.h b/resolv/include/netd_resolv/resolv.h
index 9989766..e30f31a 100644
--- a/resolv/include/netd_resolv/resolv.h
+++ b/resolv/include/netd_resolv/resolv.h
@@ -102,8 +102,8 @@
 typedef void (*private_dns_validated_callback)(unsigned netid, const char* server,
                                                const char* hostname, bool success);
 
-LIBNETD_RESOLV_PUBLIC hostent* android_gethostbyaddrfornetcontext(const void*, socklen_t, int,
-                                                                  const android_net_context*);
+LIBNETD_RESOLV_PUBLIC int android_gethostbyaddrfornetcontext(const void*, socklen_t, int,
+                                                             const android_net_context*, hostent**);
 LIBNETD_RESOLV_PUBLIC int android_gethostbynamefornetcontext(const char*, int,
                                                              const android_net_context*, hostent**);
 LIBNETD_RESOLV_PUBLIC int android_getaddrinfofornetcontext(const char*, const char*,
diff --git a/resolv/include/netd_resolv/resolv_stub.h b/resolv/include/netd_resolv/resolv_stub.h
index a2462bd..fddabcf 100644
--- a/resolv/include/netd_resolv/resolv_stub.h
+++ b/resolv/include/netd_resolv/resolv_stub.h
@@ -37,8 +37,8 @@
     int (*android_getaddrinfofornetcontext)(const char*, const char*, const addrinfo*,
                                             const android_net_context*, addrinfo**);
 
-    hostent* (*android_gethostbyaddrfornetcontext)(const void*, socklen_t, int,
-                                                   const android_net_context*);
+    int (*android_gethostbyaddrfornetcontext)(const void*, socklen_t, int,
+                                              const android_net_context*, hostent**);
 
     int (*android_gethostbynamefornetcontext)(const char*, int, const android_net_context*,
                                               hostent**);