diff options
author | Elliott Hughes <enh@google.com> | 2019-03-21 14:42:55 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2019-03-21 14:59:45 -0700 |
commit | 7acb0d39e858c2f4251298e722ffe42ca7924156 (patch) | |
tree | 14aa480ba26fbbef606a2c48e9bce504ea3325bc /libcutils/sockets_unix.cpp | |
parent | ee3cce8b7bd1e0fdb19a0146322030a34ad3c452 (diff) |
Clean up some mess by only building Android-specific code for the device.
Test: treehugger
Change-Id: Id44721ccd1817d8c537b226f60a58b7cb691fb01
Diffstat (limited to 'libcutils/sockets_unix.cpp')
-rw-r--r-- | libcutils/sockets_unix.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libcutils/sockets_unix.cpp b/libcutils/sockets_unix.cpp index 22488178f..6acdcd89b 100644 --- a/libcutils/sockets_unix.cpp +++ b/libcutils/sockets_unix.cpp @@ -16,8 +16,6 @@ #include <cutils/sockets.h> -#define LOG_TAG "socket-unix" - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -27,9 +25,6 @@ #include <time.h> #include <unistd.h> -#include <cutils/android_get_control_file.h> -#include <log/log.h> - #include "android_get_control_env.h" int socket_close(int sock) { @@ -62,6 +57,7 @@ ssize_t socket_send_buffers(cutils_socket_t sock, return writev(sock, iovec_buffers, num_buffers); } +#if defined(__ANDROID__) int android_get_control_socket(const char* name) { int fd = __android_get_control_from_env(ANDROID_SOCKET_ENV_PREFIX, name); @@ -82,3 +78,8 @@ int android_get_control_socket(const char* name) { } return -1; } +#else +int android_get_control_socket(const char*) { + return -1; +} +#endif |