adb: actually fix the windows build. am: 58eda35ace am: bbd6d7b3e7

am: 1ceca95f8e

Change-Id: I1c8c386d69b3528a9be8f1b2c0032ed04363a228
This commit is contained in:
Josh Gao 2016-11-17 21:59:57 +00:00 committed by android-build-merger
commit 0d5c1a7745

View file

@ -30,6 +30,11 @@
#define TRACE_TAG TRACE_SOCKETS
#include "adb.h"
#if defined(_WIN32)
#define pthread_mutex_lock(...) abort()
#define pthread_mutex_unlock(...) abort()
#else
#include <pthread.h>
static pthread_mutex_t socket_list_lock;
static void __attribute__((constructor)) socket_list_lock_init(void) {
pthread_mutexattr_t attr;
@ -37,6 +42,7 @@ static void __attribute__((constructor)) socket_list_lock_init(void) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&socket_list_lock, &attr);
}
#endif
int sendfailmsg(int fd, const char *reason)
{