summaryrefslogtreecommitdiff
path: root/libcutils/socket_local_client.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-11-22 07:48:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-22 07:48:16 +0000
commiteda16b98dce3ef4c75b7b46c6acdab2b6970f54a (patch)
treeac5c472667de701158d5444c9f7b447cea9389a1 /libcutils/socket_local_client.c
parent6fe92d1a3fb17545d82d020a3c995f32e6b71f9d (diff)
parent9768d24fa096e312e472a43e13cf2867c1bf581d (diff)
Merge "Kill LOCAL_SOCKET_NAMESPACE."
Diffstat (limited to 'libcutils/socket_local_client.c')
-rw-r--r--libcutils/socket_local_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcutils/socket_local_client.c b/libcutils/socket_local_client.c
index ddcc2da4e..7b42daaee 100644
--- a/libcutils/socket_local_client.c
+++ b/libcutils/socket_local_client.c
@@ -52,7 +52,7 @@ int socket_make_sockaddr_un(const char *name, int namespaceId,
switch (namespaceId) {
case ANDROID_SOCKET_NAMESPACE_ABSTRACT:
-#ifdef HAVE_LINUX_LOCAL_SOCKET_NAMESPACE
+#if defined(__linux__)
namelen = strlen(name);
// Test with length +1 for the *initial* '\0'.
@@ -67,7 +67,7 @@ int socket_make_sockaddr_un(const char *name, int namespaceId,
p_addr->sun_path[0] = 0;
memcpy(p_addr->sun_path + 1, name, namelen);
-#else /*HAVE_LINUX_LOCAL_SOCKET_NAMESPACE*/
+#else
/* this OS doesn't have the Linux abstract namespace */
namelen = strlen(name) + strlen(FILESYSTEM_SOCKET_PREFIX);
@@ -79,7 +79,7 @@ int socket_make_sockaddr_un(const char *name, int namespaceId,
strcpy(p_addr->sun_path, FILESYSTEM_SOCKET_PREFIX);
strcat(p_addr->sun_path, name);
-#endif /*HAVE_LINUX_LOCAL_SOCKET_NAMESPACE*/
+#endif
break;
case ANDROID_SOCKET_NAMESPACE_RESERVED: