hddtemp-0.3_beta15-iconv.patch 780 B

1234567891011121314151617181920212223242526272829
  1. --- hddtemp-0.3-beta15/src/utf8.c~ 2007-03-27 09:09:59.000000000 +0200
  2. +++ hddtemp-0.3-beta15/src/utf8.c 2007-03-27 09:10:06.000000000 +0200
  3. @@ -23,7 +23,9 @@
  4. // Standard includes
  5. #include <stdlib.h>
  6. +#ifdef HAVE_ICONV
  7. #include <iconv.h>
  8. +#endif
  9. #include <langinfo.h>
  10. #include <locale.h>
  11. #include <string.h>
  12. @@ -34,6 +36,7 @@
  13. static char *iconv_from_utf8_to_locale(const char *string, const char* fallback_string)
  14. {
  15. +#ifdef HAVE_ICONV
  16. const size_t buffer_inc = 80; // Increment buffer size in 80 bytes step
  17. const char *charset;
  18. iconv_t cd;
  19. @@ -93,6 +96,7 @@
  20. if (dest_buffer != NULL)
  21. free(dest_buffer); // free buffer
  22. free(src_buffer); // free string
  23. +#endif // HAVE_ICONV
  24. return strdup(fallback_string); // and return fallback string
  25. }