From 7acb0d39e858c2f4251298e722ffe42ca7924156 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 21 Mar 2019 14:42:55 -0700 Subject: Clean up some mess by only building Android-specific code for the device. Test: treehugger Change-Id: Id44721ccd1817d8c537b226f60a58b7cb691fb01 --- libcutils/sockets_unix.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libcutils/sockets_unix.cpp') 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 -#define LOG_TAG "socket-unix" - #include #include #include @@ -27,9 +25,6 @@ #include #include -#include -#include - #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 -- cgit v1.2.3