diff options
Diffstat (limited to 'libcutils/sockets.c')
-rw-r--r-- | libcutils/sockets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcutils/sockets.c b/libcutils/sockets.c index 15ede2b5b..d43878258 100644 --- a/libcutils/sockets.c +++ b/libcutils/sockets.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <cutils/sockets.h> | 17 | #include <cutils/sockets.h> |
18 | #include <log/log.h> | 18 | #include <log/log.h> |
19 | 19 | ||
20 | #ifdef HAVE_ANDROID_OS | 20 | #if defined(__ANDROID__) |
21 | /* For the socket trust (credentials) check */ | 21 | /* For the socket trust (credentials) check */ |
22 | #include <private/android_filesystem_config.h> | 22 | #include <private/android_filesystem_config.h> |
23 | #define __android_unused | 23 | #define __android_unused |
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | bool socket_peer_is_trusted(int fd __android_unused) | 28 | bool socket_peer_is_trusted(int fd __android_unused) |
29 | { | 29 | { |
30 | #ifdef HAVE_ANDROID_OS | 30 | #if defined(__ANDROID__) |
31 | struct ucred cr; | 31 | struct ucred cr; |
32 | socklen_t len = sizeof(cr); | 32 | socklen_t len = sizeof(cr); |
33 | int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len); | 33 | int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len); |