summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao2016-11-17 15:51:26 -0600
committerandroid-build-merger2016-11-17 15:51:26 -0600
commit1ceca95f8e4adf555307a57719338272f622a090 (patch)
tree38e406c9d120d5a9e09635c25369db8ba5e2d5c9
parent85b6b131753ba55e6fb4de95f15921742350f74d (diff)
parentbbd6d7b3e708e8e39ca7fe7f79b1cd2e4a074cc1 (diff)
downloadplatform-system-core-1ceca95f8e4adf555307a57719338272f622a090.tar.gz
platform-system-core-1ceca95f8e4adf555307a57719338272f622a090.tar.xz
platform-system-core-1ceca95f8e4adf555307a57719338272f622a090.zip
adb: actually fix the windows build. am: 58eda35ace
am: bbd6d7b3e7 Change-Id: I0d2553e19b3e96e9af4e0aa3493a4b8b36e55431
-rw-r--r--adb/sockets.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/adb/sockets.c b/adb/sockets.c
index bc8fffaac..7975adbec 100644
--- a/adb/sockets.c
+++ b/adb/sockets.c
@@ -20,13 +20,17 @@
20#include <errno.h> 20#include <errno.h>
21#include <string.h> 21#include <string.h>
22#include <ctype.h> 22#include <ctype.h>
23#include <pthread.h>
24 23
25#include "sysdeps.h" 24#include "sysdeps.h"
26 25
27#define TRACE_TAG TRACE_SOCKETS 26#define TRACE_TAG TRACE_SOCKETS
28#include "adb.h" 27#include "adb.h"
29 28
29#if defined(_WIN32)
30#define pthread_mutex_lock(...) abort()
31#define pthread_mutex_unlock(...) abort()
32#else
33#include <pthread.h>
30static pthread_mutex_t socket_list_lock; 34static pthread_mutex_t socket_list_lock;
31static void __attribute__((constructor)) socket_list_lock_init(void) { 35static void __attribute__((constructor)) socket_list_lock_init(void) {
32 pthread_mutexattr_t attr; 36 pthread_mutexattr_t attr;
@@ -34,6 +38,7 @@ static void __attribute__((constructor)) socket_list_lock_init(void) {
34 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); 38 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
35 pthread_mutex_init(&socket_list_lock, &attr); 39 pthread_mutex_init(&socket_list_lock, &attr);
36} 40}
41#endif
37 42
38int sendfailmsg(int fd, const char *reason) 43int sendfailmsg(int fd, const char *reason)
39{ 44{