summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-07-13 16:39:21 +0200
committerGravatar Martin Szulecki2013-07-13 16:39:21 +0200
commit85536b2848b8c7f5ed6212db56b4b60592990a00 (patch)
tree341d79de8598eccd861b13dca98371db2dbba597
parent41b640d30dc12dbb5cebbf7316a191efdd6f2c74 (diff)
downloadlibimobiledevice-85536b2848b8c7f5ed6212db56b4b60592990a00.tar.gz
libimobiledevice-85536b2848b8c7f5ed6212db56b4b60592990a00.tar.bz2
common: Fix WIN32 portability for recent userpref security fix
-rw-r--r--common/userpref.c7
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 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+#ifndef WIN32
#include <pwd.h>
+#endif
#include <unistd.h>
#ifdef HAVE_OPENSSL
#include <openssl/pem.h>
@@ -155,7 +160,7 @@ static char *get_home_dir_from_system(void)
static const char *userpref_get_config_dir()
{
- char *base_config_dir;
+ char *base_config_dir = NULL;
int use_dot_config;
if (__config_dir)