diff options
author | Elliott Hughes <enh@google.com> | 2014-05-20 12:01:29 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-05-20 12:13:29 -0700 |
commit | 0bff5bd95268184a34ae69c062584a8d1f4d87fb (patch) | |
tree | 4c05e0c1c37884abb31b849bc2a721d389c59d92 /libcutils | |
parent | 3816305b58b0eeb098f2f989ef03208d1f29f4da (diff) | |
download | system_core-0bff5bd95268184a34ae69c062584a8d1f4d87fb.zip system_core-0bff5bd95268184a34ae69c062584a8d1f4d87fb.tar.gz system_core-0bff5bd95268184a34ae69c062584a8d1f4d87fb.tar.bz2 |
Fix win32 undefined reference to `_socket_network_client_timeout'.
Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
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 } |