summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao2016-11-17 15:59:57 -0600
committerandroid-build-merger2016-11-17 15:59:57 -0600
commit0d5c1a7745a287dd6f09133824f6426ce8b280be (patch)
tree1027837549a0320719425d59d14fd67dc57535d0
parent4775e669966b820a33d32a0d578be825511f8bf9 (diff)
parent1ceca95f8e4adf555307a57719338272f622a090 (diff)
downloadplatform-system-core-0d5c1a7745a287dd6f09133824f6426ce8b280be.tar.gz
platform-system-core-0d5c1a7745a287dd6f09133824f6426ce8b280be.tar.xz
platform-system-core-0d5c1a7745a287dd6f09133824f6426ce8b280be.zip
adb: actually fix the windows build. am: 58eda35ace am: bbd6d7b3e7
am: 1ceca95f8e Change-Id: I1c8c386d69b3528a9be8f1b2c0032ed04363a228
-rw-r--r--adb/sockets.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/adb/sockets.c b/adb/sockets.c
index cf8baed06..7cf778465 100644
--- a/adb/sockets.c
+++ b/adb/sockets.c
@@ -30,6 +30,11 @@
30#define TRACE_TAG TRACE_SOCKETS 30#define TRACE_TAG TRACE_SOCKETS
31#include "adb.h" 31#include "adb.h"
32 32
33#if defined(_WIN32)
34#define pthread_mutex_lock(...) abort()
35#define pthread_mutex_unlock(...) abort()
36#else
37#include <pthread.h>
33static pthread_mutex_t socket_list_lock; 38static pthread_mutex_t socket_list_lock;
34static void __attribute__((constructor)) socket_list_lock_init(void) { 39static void __attribute__((constructor)) socket_list_lock_init(void) {
35 pthread_mutexattr_t attr; 40 pthread_mutexattr_t attr;
@@ -37,6 +42,7 @@ static void __attribute__((constructor)) socket_list_lock_init(void) {
37 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); 42 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
38 pthread_mutex_init(&socket_list_lock, &attr); 43 pthread_mutex_init(&socket_list_lock, &attr);
39} 44}
45#endif
40 46
41int sendfailmsg(int fd, const char *reason) 47int sendfailmsg(int fd, const char *reason)
42{ 48{