[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hddtemp-dev] patches for uclibc support
From: |
Aurelien Francillon |
Subject: |
Re: [hddtemp-dev] patches for uclibc support |
Date: |
Tue, 27 Mar 2007 09:45:29 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070303) |
Aurélien Francillon a écrit :
Hi,
please find attached a few patches to make compile hddtemp on uclibc based
hosts. They use autoconf checks so they should not break other builds...
please find attached a simpler patch for hddtemp-0.3_beta15-iconv.patch
cheers
Aurélien
--- 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
}