Fix for imap on sparc64 (and probably other 64bits archs), from Andrey Smagin.

This commit is contained in:
couderc 2004-04-12 13:02:35 +00:00
parent 888b84d5a0
commit f3620193e4

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_procmsg_c,v 1.1 2004/04/12 13:02:35 couderc Exp $
--- src/procmsg.c.orig 2004-04-12 15:53:19.000000000 +0200
+++ src/procmsg.c 2004-04-12 15:55:34.000000000 +0200
@@ -127,8 +127,8 @@ GHashTable *procmsg_to_folder_hash_table
static gint procmsg_read_cache_data_str(FILE *fp, gchar **str)
{
gchar buf[BUFFSIZE];
- gint ret = 0;
- size_t len;
+ gint ret = 0,
+ len;
if (fread(&len, sizeof(len), 1, fp) == 1) {
if (len < 0)
@@ -137,7 +137,7 @@ static gint procmsg_read_cache_data_str(
gchar *tmp = NULL;
while (len > 0) {
- size_t size = MIN(len, BUFFSIZE - 1);
+ gint size = MIN(len, BUFFSIZE - 1);
if (fread(buf, size, 1, fp) != 1) {
ret = -1;