From: Christian Grothoff Date: Mon, 5 Oct 2009 10:31:29 +0000 (+0000) Subject: bsdism X-Git-Tag: initial-import-from-subversion-38251~23377 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=432e1e621c428190d752af86017ad99199b05292;p=oweals%2Fgnunet.git bsdism --- diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 39b5174e3..a8789281e 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -314,6 +314,7 @@ os_get_exec_path () { char *ret; + ret = NULL; #if LINUX ret = get_path_from_proc_exe (); if (ret != NULL) @@ -330,7 +331,7 @@ os_get_exec_path () return ret; #endif /* other attempts here */ - return NULL; + return ret; } diff --git a/src/util/strings.c b/src/util/strings.c index c24649e97..23e6cd85b 100644 --- a/src/util/strings.c +++ b/src/util/strings.c @@ -198,7 +198,13 @@ GNUNET_STRINGS_to_utf8 (const char *input, size_t len, const char *charset) tmp = GNUNET_malloc (tmpSize); itmp = tmp; finSize = tmpSize; - if (iconv (cd, (char **) &input, &len, &itmp, &finSize) == (size_t) - 1) + if (iconv (cd, +#if FREEBSD + (const char **) &input, +#else + (char **) &input, +#endif + &len, &itmp, &finSize) == (size_t) - 1) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "iconv"); iconv_close (cd);