From: Vsevolod Stakhov Date: Wed, 23 Jun 2010 11:13:50 +0000 (+0400) Subject: * Fix -lintl detection X-Git-Tag: 0.3.1~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=411f4a081f36c8305b6c9b750e8f43fc50beb879;p=thirdparty%2Frspamd.git * Fix -lintl detection * Init some variables to avoid problems --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1605bd41bb..cd501c68f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,15 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") SET(ETC_PREFIX /usr/local/etc) SET(PREFIX /usr/local) ENDIF(NOT ETC_PREFIX) + FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS /lib + /opt/lib + /usr/lib + /usr/local/lib + DOC "Path where the libintl library can be found") + LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY}) + + ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + LIST(APPEND CMAKE_REQUIRED_LIBRARIES intl) ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") @@ -65,7 +74,12 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") SET(ETC_PREFIX /usr/local/etc) SET(PREFIX /usr/local) ENDIF(NOT ETC_PREFIX) - LIST(APPEND CMAKE_REQUIRED_LIBRARIES intl) + FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS /lib + /opt/lib + /usr/lib + /usr/local/lib + DOC "Path where the libintl library can be found") + LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY}) ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 7a0d1b0b86..c660f16c35 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -578,7 +578,12 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task, const char * struct mime_text_part *part; GList *cur, *headerlist; GRegex *regexp; - struct url_regexp_param callback_param; + struct url_regexp_param callback_param = { + .task = task, + .regexp = re->regexp, + .re = re, + .found = FALSE + }; int r; diff --git a/src/symbols_cache.c b/src/symbols_cache.c index f24380f284..b22f85dc89 100644 --- a/src/symbols_cache.c +++ b/src/symbols_cache.c @@ -42,8 +42,8 @@ #define MIN_CACHE 17 -static uint64_t total_frequency; -static uint32_t nsymbols; +static uint64_t total_frequency = 0; +static uint32_t nsymbols = 0; int cache_cmp (const void *p1, const void *p2)