]> source.dussan.org Git - rspamd.git/commitdiff
* Fix -lintl detection
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 23 Jun 2010 11:13:50 +0000 (15:13 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 23 Jun 2010 11:13:50 +0000 (15:13 +0400)
* Init some variables to avoid problems

CMakeLists.txt
src/plugins/regexp.c
src/symbols_cache.c

index 1605bd41bb61fe4a3bb0021ed97d8837d4632515..cd501c68f83a036ddf8586a2e1fe422c4645d65f 100644 (file)
@@ -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")
 
index 7a0d1b0b866951ec26ac9b6a6db08fa14997eab9..c660f16c350e7e215394bb6a036a2c14bff61f17 100644 (file)
@@ -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;
 
 
index f24380f2840d9f4521213f26f0f703623dde29e5..b22f85dc89fedb7869453eafb2f896eba907948d 100644 (file)
@@ -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)