Hi,

this patch fixes a symbol conflict in static build with MySQL enabled

Compile error log:
http://autobuild.buildroot.net/results/9b5/9b536926b3b2bf82c683b48e9697a220
f1b4bf33/build-end.log

Signed-off-by: Bernd Kuhls <bernd.ku...@t-online.de>

diff -uNr dovecot-2.2.15.org/src/doveadm/doveadm-log.c dovecot-
2.2.15/src/doveadm/doveadm-log.c
--- dovecot-2.2.15.org/src/doveadm/doveadm-log.c        2014-06-13 
01:02:23.000000000 +0200
+++ dovecot-2.2.15/src/doveadm/doveadm-log.c    2014-11-20 
19:46:49.000000000 +0100
@@ -293,7 +293,7 @@
                }
        }
 
-       if (str_to_time(args[1], &t) < 0) {
+       if (dove_str_to_time(args[1], &t) < 0) {
                i_error("Invalid timestamp: %s", args[1]);
                t = 0;
        }
@@ -313,7 +313,7 @@
        while ((c = getopt(argc, argv, "s:")) > 0) {
                switch (c) {
                case 's':
-                       if (str_to_time(optarg, &min_timestamp) < 0)
+                       if (dove_str_to_time(optarg, &min_timestamp) < 0)
                                i_fatal("Invalid timestamp: %s", optarg);
                        break;
                default:
diff -uNr dovecot-2.2.15.org/src/doveadm/doveadm-replicator.c dovecot-
2.2.15/src/doveadm/doveadm-replicator.c
--- dovecot-2.2.15.org/src/doveadm/doveadm-replicator.c 2014-06-13 
01:02:50.000000000 +0200
+++ dovecot-2.2.15/src/doveadm/doveadm-replicator.c     2014-11-20 
19:46:40.000000000 +0100
@@ -166,8 +166,8 @@
                T_BEGIN {
                        args = t_strsplit_tab(line);
                        if (str_array_length(args) >= 5 &&
-                           str_to_time(args[2], &last_fast) == 0 &&
-                           str_to_time(args[3], &last_full) == 0) {
+                           dove_str_to_time(args[2], &last_fast) == 0 &&
+                           dove_str_to_time(args[3], &last_full) == 0) {
                                doveadm_print(args[0]);
                                doveadm_print(args[1]);
                                doveadm_print(time_ago(last_fast));
diff -uNr dovecot-2.2.15.org/src/doveadm/dsync/dsync-ibc-stream.c dovecot-
2.2.15/src/doveadm/dsync/dsync-ibc-stream.c
--- dovecot-2.2.15.org/src/doveadm/dsync/dsync-ibc-stream.c     2014-09-29 
13:07:07.000000000 +0200
+++ dovecot-2.2.15/src/doveadm/dsync/dsync-ibc-stream.c 2014-11-20 
19:47:16.000000000 +0100
@@ -979,12 +979,12 @@
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
        if (dsync_deserializer_decode_try(decoder, "last_renamed_or_created", 
&value) &&
-           str_to_time(value, &node->last_renamed_or_created) < 0) {
+           dove_str_to_time(value, &node->last_renamed_or_created) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid 
last_renamed_or_created");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
        if (dsync_deserializer_decode_try(decoder, 
"last_subscription_change", &value) &&
-           str_to_time(value, &node->last_subscription_change) < 0) {
+           dove_str_to_time(value, &node->last_subscription_change) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid 
last_subscription_change");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
@@ -1064,7 +1064,7 @@
                if (guid_128_from_string(tmp[i], del->guid) < 0)
                        return -1;
                if (tmp[i+1] == NULL ||
-                   str_to_time(tmp[i+1], &del->timestamp) < 0)
+                   dove_str_to_time(tmp[i+1], &del->timestamp) < 0)
                        return -1;
        }
        return 0;
@@ -1251,7 +1251,7 @@
                field.decision |= MAIL_CACHE_DECISION_FORCED;
 
        if (dsync_deserializer_decode_try(decoder, "last_used", &value) &&
-           str_to_time(value, &field.last_used) < 0) {
+           dove_str_to_time(value, &field.last_used) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid last_used");
                ret = -1;
        }
@@ -1454,7 +1454,7 @@
        if (dsync_deserializer_decode_try(decoder, "deleted", &value))
                attr->deleted = TRUE;
        if (dsync_deserializer_decode_try(decoder, "last_change", &value) &&
-           str_to_time(value, &attr->last_change) < 0) {
+           dove_str_to_time(value, &attr->last_change) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid last_change");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
@@ -1763,12 +1763,12 @@
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
        if (dsync_deserializer_decode_try(decoder, "received_date", &value) 
&&
-           str_to_time(value, &mail->received_date) < 0) {
+           dove_str_to_time(value, &mail->received_date) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid received_date");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
        if (dsync_deserializer_decode_try(decoder, "saved_date", &value) &&
-           str_to_time(value, &mail->saved_date) < 0) {
+           dove_str_to_time(value, &mail->saved_date) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid saved_date");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
diff -uNr dovecot-2.2.15.org/src/lib/strnum.c dovecot-
2.2.15/src/lib/strnum.c
--- dovecot-2.2.15.org/src/lib/strnum.c 2014-09-24 21:34:27.000000000 +
0200
+++ dovecot-2.2.15/src/lib/strnum.c     2014-11-20 19:46:54.000000000 +0100
@@ -256,7 +256,7 @@
        return 0;
 }
 
-int str_to_time(const char *str, time_t *num_r)
+int dove_str_to_time(const char *str, time_t *num_r)
 {
        intmax_t l;
 
diff -uNr dovecot-2.2.15.org/src/lib-http/http-response-parser.c dovecot-
2.2.15/src/lib-http/http-response-parser.c
--- dovecot-2.2.15.org/src/lib-http/http-response-parser.c      2014-07-01 
23:10:16.000000000 +0200
+++ dovecot-2.2.15/src/lib-http/http-response-parser.c  2014-11-20 
19:47:01.000000000 +0100
@@ -252,7 +252,7 @@
 
        delta-seconds  = 1*DIGIT
         */
-       if (str_to_time(hdrval, &delta) >= 0) {
+       if (dove_str_to_time(hdrval, &delta) >= 0) {
                if (resp_time == (time_t)-1) {
                        return -1;
                }
diff -uNr dovecot-2.2.15.org/src/lib-master/master-instance.c dovecot-
2.2.15/src/lib-master/master-instance.c
--- dovecot-2.2.15.org/src/lib-master/master-instance.c 2014-09-25 
11:49:24.000000000 +0200
+++ dovecot-2.2.15/src/lib-master/master-instance.c     2014-11-20 
19:46:57.000000000 +0100
@@ -82,7 +82,7 @@
        args = t_strsplit_tabescaped(line);
        if (str_array_length(args) < 3)
                return -1;
-       if (str_to_time(args[0], &last_used) < 0)
+       if (dove_str_to_time(args[0], &last_used) < 0)
                return -1;
 
        inst = array_append_space(&list->instances);
diff -uNr dovecot-2.2.15.org/src/replication/replicator/replicator-queue.c 
dovecot-2.2.15/src/replication/replicator/replicator-queue.c
--- dovecot-2.2.15.org/src/replication/replicator/replicator-queue.c
        2014-06-13 01:08:08.000000000 +0200
+++ dovecot-2.2.15/src/replication/replicator/replicator-queue.c        2014-11-
20 19:47:23.000000000 +0100
@@ -315,9 +315,9 @@
        state = t_strdup_noconst(args[6]);
        if (username[0] == '\0' ||
            str_to_uint(args[1], &priority) < 0 ||
-           str_to_time(args[2], &tmp_user.last_update) < 0 ||
-           str_to_time(args[3], &tmp_user.last_fast_sync) < 0 ||
-           str_to_time(args[4], &tmp_user.last_full_sync) < 0)
+           dove_str_to_time(args[2], &tmp_user.last_update) < 0 ||
+           dove_str_to_time(args[3], &tmp_user.last_fast_sync) < 0 ||
+           dove_str_to_time(args[4], &tmp_user.last_full_sync) < 0)
                return -1;
        tmp_user.priority = priority;
        tmp_user.last_sync_failed = args[5][0] != '0';

Reply via email to