bsdism
authorChristian Grothoff <christian@grothoff.org>
Mon, 5 Oct 2009 10:31:29 +0000 (10:31 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 5 Oct 2009 10:31:29 +0000 (10:31 +0000)
src/util/os_installation.c
src/util/strings.c

index 39b5174e360394c61f415c7036989d848b59585f..a8789281e316393baf631b10c03467c985ad1605 100644 (file)
@@ -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;
 }
 
 
index c24649e97a793507220eb1df6b41a87c07112992..23e6cd85bfd404c5390256ec4e80ada56b71ce3c 100644 (file)
@@ -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);