adb: actually fix the windows build.
am: 58eda35ace
Change-Id: If917d578acb8a0b289369f7b5b1aca7deff4a4b9
This commit is contained in:
commit
bbd6d7b3e7
|
@ -20,13 +20,17 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "sysdeps.h"
|
||||
|
||||
#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;
|
||||
|
@ -34,6 +38,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 New Issue