Report getaddrinfo failures correctly.
Also move us off the "convenience" function because you can't get useful
error reporting from it.
Change-Id: I5fcc6a6d762f5f60906980a7835f01a35045be65
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 5efdab5..c051eb3 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -24,6 +24,8 @@
# undef _WIN32
#endif
+#include <errno.h>
+
/*
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
* <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
@@ -187,9 +189,6 @@
/* normally provided by <cutils/sockets.h> */
extern int socket_loopback_client(int port, int type);
-extern int socket_network_client(const char *host, int port, int type);
-extern int socket_network_client_timeout(const char *host, int port, int type,
- int timeout);
extern int socket_loopback_server(int port, int type);
extern int socket_inaddr_any_server(int port, int type);
@@ -274,7 +273,6 @@
#else /* !_WIN32 a.k.a. Unix */
#include "fdevent.h"
-#include <cutils/sockets.h>
#include <cutils/misc.h>
#include <cutils/threads.h>
#include <signal.h>