X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Flog4cxx%2F0001-charset-fixes.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Flog4cxx%2F0001-charset-fixes.patch;h=75567fdad198ca335cce536e6f52d8cd365af2a2;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/log4cxx/0001-charset-fixes.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/log4cxx/0001-charset-fixes.patch new file mode 100644 index 0000000..75567fd --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/log4cxx/0001-charset-fixes.patch @@ -0,0 +1,43 @@ +Fix build when iconv support is not available + +When iconv support is not available, the apr-util library does not +provide character set conversion features, and therefore APR_HAS_XLATE +is false. + +However, on Linux !defined(_WIN32) is always true, but the part of the +code that defines the APRCharsetDecoder and APRCharsetEncoder are only +enclosed in a #if APR_HAS_XLATE, without the "|| defined(_WIN32)" +which leads to build failures: the APRCharsetEncoder and +APRCharsetDecoder classes are used without being defined. + +This patch removes the || !defined(_WIN32) so that when iconv support +is not here, we fall back to raising an exception at runtime. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/main/cpp/charsetdecoder.cpp +=================================================================== +--- a/src/main/cpp/charsetdecoder.cpp ++++ b/src/main/cpp/charsetdecoder.cpp +@@ -476,7 +476,7 @@ + StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("ISO-LATIN-1"), LOG4CXX_STR("iso-latin-1"))) { + return new ISOLatinCharsetDecoder(); + } +-#if APR_HAS_XLATE || !defined(_WIN32) ++#if APR_HAS_XLATE + return new APRCharsetDecoder(charset); + #else + throw IllegalArgumentException(charset); +Index: b/src/main/cpp/charsetencoder.cpp +=================================================================== +--- a/src/main/cpp/charsetencoder.cpp ++++ b/src/main/cpp/charsetencoder.cpp +@@ -484,7 +484,7 @@ + } else if (StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("UTF-16LE"), LOG4CXX_STR("utf-16le"))) { + return new UTF16LECharsetEncoder(); + } +-#if APR_HAS_XLATE || !defined(_WIN32) ++#if APR_HAS_XLATE + return new APRCharsetEncoder(charset); + #else + throw IllegalArgumentException(charset);