diff options
author | Elliott Hughes <enh@google.com> | 2014-05-20 20:18:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-20 20:18:01 +0000 |
commit | b65208d1a98c4cc6b4fbae302f7718f056e2fadd (patch) | |
tree | b363fd58c3012759d4b2a59d803b3b0273470ed0 /libcutils | |
parent | aceba829f127349b331601fcc65293f5e81f7a65 (diff) | |
parent | f7a7e3c301fdf7d98d8bcabf6fefb0fcf5bbf90d (diff) | |
download | system_core-b65208d1a98c4cc6b4fbae302f7718f056e2fadd.zip system_core-b65208d1a98c4cc6b4fbae302f7718f056e2fadd.tar.gz system_core-b65208d1a98c4cc6b4fbae302f7718f056e2fadd.tar.bz2 |
am f7a7e3c3: am 6dfb039b: am 4a343436: Merge "Fix win32 undefined reference to `_socket_network_client_timeout\'."
* commit 'f7a7e3c301fdf7d98d8bcabf6fefb0fcf5bbf90d':
Fix win32 undefined reference to `_socket_network_client_timeout'.
Diffstat (limited to 'libcutils')
-rw-r--r-- | libcutils/Android.mk | 17 | ||||
-rw-r--r-- | libcutils/socket_network_client.c | 10 |
2 files changed, 9 insertions, 18 deletions
diff --git a/libcutils/Android.mk b/libcutils/Android.mk index 945ebdd..e1d6f49 100644 --- a/libcutils/Android.mk +++ b/libcutils/Android.mk @@ -27,13 +27,6 @@ commonSources := \ hashmap.c \ atomic.c.arm \ native_handle.c \ - socket_inaddr_any_server.c \ - socket_local_client.c \ - socket_local_server.c \ - socket_loopback_client.c \ - socket_loopback_server.c \ - socket_network_client.c \ - sockets.c \ config_utils.c \ cpu_info.c \ load_file.c \ @@ -67,7 +60,15 @@ endif ifneq ($(WINDOWS_HOST_ONLY),1) commonSources += \ fs.c \ - multiuser.c + multiuser.c \ + socket_inaddr_any_server.c \ + socket_local_client.c \ + socket_local_server.c \ + socket_loopback_client.c \ + socket_loopback_server.c \ + socket_network_client.c \ + sockets.c \ + endif diff --git a/libcutils/socket_network_client.c b/libcutils/socket_network_client.c index 8a8474e..4826033 100644 --- a/libcutils/socket_network_client.c +++ b/libcutils/socket_network_client.c @@ -21,13 +21,11 @@ #include <string.h> #include <unistd.h> -#ifndef HAVE_WINSOCK #include <sys/socket.h> #include <sys/select.h> #include <sys/types.h> #include <netinet/in.h> #include <netdb.h> -#endif #include <cutils/sockets.h> @@ -68,13 +66,6 @@ int socket_network_client_timeout(const char *host, int port, int type, int time s = socket(hp->h_addrtype, type, 0); if (s < 0) return -1; -#ifdef HAVE_WINSOCK - if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - close(s); - return -1; - } - return s; -#else if ((flags = fcntl(s, F_GETFL, 0)) < 0) { close(s); return -1; @@ -132,5 +123,4 @@ done: } return s; -#endif } |