summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/hddtemp/files/hddtemp-0.3_beta15-iconv.patch')
-rw-r--r--app-admin/hddtemp/files/hddtemp-0.3_beta15-iconv.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/app-admin/hddtemp/files/hddtemp-0.3_beta15-iconv.patch b/app-admin/hddtemp/files/hddtemp-0.3_beta15-iconv.patch
new file mode 100644
index 000000000000..621e7549aa0b
--- /dev/null
+++ b/app-admin/hddtemp/files/hddtemp-0.3_beta15-iconv.patch
@@ -0,0 +1,28 @@
+--- hddtemp-0.3-beta15/src/utf8.c~ 2007-03-27 09:09:59.000000000 +0200
++++ hddtemp-0.3-beta15/src/utf8.c 2007-03-27 09:10:06.000000000 +0200
+@@ -23,7 +23,9 @@
+
+ // Standard includes
+ #include <stdlib.h>
++#ifdef HAVE_ICONV
+ #include <iconv.h>
++#endif
+ #include <langinfo.h>
+ #include <locale.h>
+ #include <string.h>
+@@ -34,6 +36,7 @@
+
+ static char *iconv_from_utf8_to_locale(const char *string, const char* fallback_string)
+ {
++#ifdef HAVE_ICONV
+ const size_t buffer_inc = 80; // Increment buffer size in 80 bytes step
+ const char *charset;
+ iconv_t cd;
+@@ -93,6 +96,7 @@
+ if (dest_buffer != NULL)
+ free(dest_buffer); // free buffer
+ free(src_buffer); // free string
++#endif // HAVE_ICONV
+ return strdup(fallback_string); // and return fallback string
+ }
+