diff options
| author | 2013-07-13 16:39:21 +0200 | |
|---|---|---|
| committer | 2013-07-13 16:39:21 +0200 | |
| commit | 85536b2848b8c7f5ed6212db56b4b60592990a00 (patch) | |
| tree | 341d79de8598eccd861b13dca98371db2dbba597 | |
| parent | 41b640d30dc12dbb5cebbf7316a191efdd6f2c74 (diff) | |
| download | libimobiledevice-85536b2848b8c7f5ed6212db56b4b60592990a00.tar.gz libimobiledevice-85536b2848b8c7f5ed6212db56b4b60592990a00.tar.bz2 | |
common: Fix WIN32 portability for recent userpref security fix
| -rw-r--r-- | common/userpref.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/userpref.c b/common/userpref.c index ab3a3cf..760eb58 100644 --- a/common/userpref.c +++ b/common/userpref.c | |||
| @@ -22,12 +22,17 @@ | |||
| 22 | #ifdef HAVE_CONFIG_H | 22 | #ifdef HAVE_CONFIG_H |
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #endif | 24 | #endif |
| 25 | |||
| 25 | #include <stdio.h> | 26 | #include <stdio.h> |
| 26 | #include <stdint.h> | 27 | #include <stdint.h> |
| 27 | #include <stdlib.h> | 28 | #include <stdlib.h> |
| 28 | #include <string.h> | 29 | #include <string.h> |
| 30 | #ifdef HAVE_SYS_TYPES_H | ||
| 29 | #include <sys/types.h> | 31 | #include <sys/types.h> |
| 32 | #endif | ||
| 33 | #ifndef WIN32 | ||
| 30 | #include <pwd.h> | 34 | #include <pwd.h> |
| 35 | #endif | ||
| 31 | #include <unistd.h> | 36 | #include <unistd.h> |
| 32 | #ifdef HAVE_OPENSSL | 37 | #ifdef HAVE_OPENSSL |
| 33 | #include <openssl/pem.h> | 38 | #include <openssl/pem.h> |
| @@ -155,7 +160,7 @@ static char *get_home_dir_from_system(void) | |||
| 155 | 160 | ||
| 156 | static const char *userpref_get_config_dir() | 161 | static const char *userpref_get_config_dir() |
| 157 | { | 162 | { |
| 158 | char *base_config_dir; | 163 | char *base_config_dir = NULL; |
| 159 | int use_dot_config; | 164 | int use_dot_config; |
| 160 | 165 | ||
| 161 | if (__config_dir) | 166 | if (__config_dir) |
