Browse Source

[Minor] Add workaround for punny old distros (hello CentOS 6)

tags/1.7.3
Vsevolod Stakhov 6 years ago
parent
commit
fed6b79d3a
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/libutil/str_util.c

+ 7
- 0
src/libutil/str_util.c View File

@@ -22,7 +22,9 @@
#include "contrib/t1ha/t1ha.h"
#include <unicode/uversion.h>
#include <unicode/ucnv.h>
#if U_ICU_VERSION_MAJOR_NUM >= 44
#include <unicode/unorm2.h>
#endif
#include <math.h>

const guchar lc_map[256] = {
@@ -1967,6 +1969,7 @@ gboolean
rspamd_normalise_unicode_inplace (rspamd_mempool_t *pool, gchar *start,
guint *len)
{
#if U_ICU_VERSION_MAJOR_NUM >= 44
UErrorCode uc_err = U_ZERO_ERROR;
static UConverter *utf8_conv = NULL;
static const UNormalizer2 *norm = NULL;
@@ -2040,4 +2043,8 @@ rspamd_normalise_unicode_inplace (rspamd_mempool_t *pool, gchar *start,
}

return ret;
#else
/* Kill that with fire please */
return FALSE;
#endif
}

Loading…
Cancel
Save