diff options
| author | 2015-01-27 19:43:54 +0100 | |
|---|---|---|
| committer | 2015-01-27 19:43:54 +0100 | |
| commit | 2c951c8bf15e229342abfa102e4414fd67795e19 (patch) | |
| tree | 29ba40085e382dc50fc4e4cbe5d1f3ddb147f731 /tools/idevicecrashreport.c | |
| parent | a6ea54ec581470ed70c98c86b1619f9defca8b7e (diff) | |
| download | libimobiledevice-2c951c8bf15e229342abfa102e4414fd67795e19.tar.gz libimobiledevice-2c951c8bf15e229342abfa102e4414fd67795e19.tar.bz2 | |
idevicecrashreport: Enable build for win32
Diffstat (limited to 'tools/idevicecrashreport.c')
| -rw-r--r-- | tools/idevicecrashreport.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c index de2edb5..8fcfbd0 100644 --- a/tools/idevicecrashreport.c +++ b/tools/idevicecrashreport.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <plist/plist.h> | 32 | #include <plist/plist.h> |
| 33 | 33 | ||
| 34 | #ifdef WIN32 | 34 | #ifdef WIN32 |
| 35 | #include <windows.h> | ||
| 35 | #define S_IFLNK S_IFREG | 36 | #define S_IFLNK S_IFREG |
| 36 | #define S_IFSOCK S_IFREG | 37 | #define S_IFSOCK S_IFREG |
| 37 | #endif | 38 | #endif |
| @@ -43,7 +44,11 @@ static int keep_crash_reports = 0; | |||
| 43 | static int file_exists(const char* path) | 44 | static int file_exists(const char* path) |
| 44 | { | 45 | { |
| 45 | struct stat tst; | 46 | struct stat tst; |
| 47 | #ifdef WIN32 | ||
| 48 | return (stat(path, &tst) == 0); | ||
| 49 | #else | ||
| 46 | return (lstat(path, &tst) == 0); | 50 | return (lstat(path, &tst) == 0); |
| 51 | #endif | ||
| 47 | } | 52 | } |
| 48 | 53 | ||
| 49 | static int extract_raw_crash_report(const char* filename) { | 54 | static int extract_raw_crash_report(const char* filename) { |
