diff options
| author | 2011-09-10 19:08:39 +0200 | |
|---|---|---|
| committer | 2012-03-19 01:38:54 +0100 | |
| commit | 475c9679716eec92e3508063b7486e3508c4c974 (patch) | |
| tree | 5ab09c85387821e05b052cbb642b92ae102953ec /src/afc.h | |
| parent | 6f29ab73053327066409744d025dcbd03fd6b627 (diff) | |
| download | libimobiledevice-475c9679716eec92e3508063b7486e3508c4c974.tar.gz libimobiledevice-475c9679716eec92e3508063b7486e3508c4c974.tar.bz2 | |
WIN32: use windows threads and mutexes instead of pthread_*
Diffstat (limited to 'src/afc.h')
| -rw-r--r-- | src/afc.h | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -20,7 +20,11 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include <stdint.h> | 22 | #include <stdint.h> |
| 23 | #ifdef WIN32 | ||
| 24 | #include <windows.h> | ||
| 25 | #else | ||
| 23 | #include <pthread.h> | 26 | #include <pthread.h> |
| 27 | #endif | ||
| 24 | 28 | ||
| 25 | #include "libimobiledevice/afc.h" | 29 | #include "libimobiledevice/afc.h" |
| 26 | 30 | ||
| @@ -53,7 +57,11 @@ struct afc_client_private { | |||
| 53 | AFCPacket *afc_packet; | 57 | AFCPacket *afc_packet; |
| 54 | int file_handle; | 58 | int file_handle; |
| 55 | int lock; | 59 | int lock; |
| 60 | #ifdef WIN32 | ||
| 61 | CRITICAL_SECTION mutex; | ||
| 62 | #else | ||
| 56 | pthread_mutex_t mutex; | 63 | pthread_mutex_t mutex; |
| 64 | #endif | ||
| 57 | int own_connection; | 65 | int own_connection; |
| 58 | }; | 66 | }; |
| 59 | 67 | ||
