summaryrefslogtreecommitdiff
path: root/user/dovecot/time64.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-09-15 15:30:16 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-09-15 15:30:16 +0000
commit5f54b96b9055e7a0b320fa8794151c6845126ee5 (patch)
tree243d823b40136af7755dfabe4c5d8c60e42ecd56 /user/dovecot/time64.patch
parentdb49432374e0e3ed11d99c831d1349f3ddc74a33 (diff)
downloadpackages-5f54b96b9055e7a0b320fa8794151c6845126ee5.tar.gz
packages-5f54b96b9055e7a0b320fa8794151c6845126ee5.tar.bz2
packages-5f54b96b9055e7a0b320fa8794151c6845126ee5.tar.xz
packages-5f54b96b9055e7a0b320fa8794151c6845126ee5.zip
user/dovecot: Fix two issues on 32-bit systems
Diffstat (limited to 'user/dovecot/time64.patch')
-rw-r--r--user/dovecot/time64.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/user/dovecot/time64.patch b/user/dovecot/time64.patch
new file mode 100644
index 000000000..c6f8e6261
--- /dev/null
+++ b/user/dovecot/time64.patch
@@ -0,0 +1,30 @@
+--- dovecot-2.3.11.3/src/lib-oauth2/oauth2-jwt.c.old 2020-08-12 12:20:41.000000000 +0000
++++ dovecot-2.3.11.3/src/lib-oauth2/oauth2-jwt.c 2020-09-15 14:21:24.285796733 +0000
+@@ -31,13 +31,13 @@
+ }
+
+ static int get_time_field(const struct json_tree *tree, const char *key,
+- long *value_r)
++ long long *value_r)
+ {
+ const char *value = get_field(tree, key);
+ int tz_offset ATTR_UNUSED;
+ if (value == NULL)
+ return 0;
+- if ((str_to_long(value, value_r) < 0 &&
++ if ((str_to_llong(value, value_r) < 0 &&
+ !iso8601_date_parse((const unsigned char*)value, strlen(value),
+ value_r, &tz_offset)) ||
+ *value_r < 0)
+@@ -283,9 +283,9 @@
+ const char *sub = get_field(tree, "sub");
+
+ int ret;
+- long t0 = time(NULL);
++ long long t0 = time(NULL);
+ /* default IAT and NBF to now */
+- long iat, nbf, exp;
++ long long iat, nbf, exp;
+ int tz_offset ATTR_UNUSED;
+
+ if (sub == NULL) {