adb: actually fix the windows build. am: 58eda35ace
am: bbd6d7b3e7
am: 1ceca95f8e
Change-Id: I1c8c386d69b3528a9be8f1b2c0032ed04363a228
This commit is contained in:
commit
0d5c1a7745
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue