# HG changeset patch # User Mark Huetsch # Date 1161634914 0 # Node ID dfd272ab67e7f2bbf7f53b56a3b738d1470f17e1 # Parent 967c39d78bc49ef5df484588555040adbef16f9a [gaim-migrate @ 17569] Let qq compile on Solaris. Patch thanks to Torrey McMahon (tmcmahon2) and Taso N. Devetzis (devetzis). committer: Tailor Script diff -r 967c39d78bc4 -r dfd272ab67e7 libgaim/protocols/qq/file_trans.c --- a/libgaim/protocols/qq/file_trans.c Mon Oct 23 19:43:45 2006 +0000 +++ b/libgaim/protocols/qq/file_trans.c Mon Oct 23 20:21:54 2006 +0000 @@ -218,8 +218,8 @@ static int _qq_xfer_open_file(const gchar *filename, const gchar *method, GaimXfer *xfer) { ft_info *info = xfer->data; - info->dest_fp = fopen(gaim_xfer_get_local_filename(xfer), method); - if (info->dest_fp == NULL) { + info->u.dest_fp = fopen(gaim_xfer_get_local_filename(xfer), method); + if (info->u.dest_fp == NULL) { return -1; } return 0; @@ -229,22 +229,22 @@ { ft_info *info = xfer->data; - fseek(info->dest_fp, index * len, SEEK_SET); - return fread(buffer, 1, len, info->dest_fp); + fseek(info->u.dest_fp, index * len, SEEK_SET); + return fread(buffer, 1, len, info->u.dest_fp); } static gint _qq_xfer_write_file(guint8 *buffer, guint index, guint len, GaimXfer *xfer) { ft_info *info = xfer->data; - fseek(info->dest_fp, index * len, SEEK_SET); - return fwrite(buffer, 1, len, info->dest_fp); + fseek(info->u.dest_fp, index * len, SEEK_SET); + return fwrite(buffer, 1, len, info->u.dest_fp); } void qq_xfer_close_file(GaimXfer *xfer) { ft_info *info = xfer->data; - if (info->dest_fp) fclose(info->dest_fp); + if (info->u.dest_fp) fclose(info->u.dest_fp); } #endif diff -r 967c39d78bc4 -r dfd272ab67e7 libgaim/protocols/qq/send_file.c --- a/libgaim/protocols/qq/send_file.c Mon Oct 23 19:43:45 2006 +0000 +++ b/libgaim/protocols/qq/send_file.c Mon Oct 23 20:21:54 2006 +0000 @@ -204,8 +204,8 @@ info = (ft_info *) xfer->data; qq_xfer_close_file(xfer); - if (info->dest_fp != NULL) { - fclose(info->dest_fp); + if (info->u.dest_fp != NULL) { + fclose(info->u.dest_fp); gaim_debug(GAIM_DEBUG_INFO, "QQ", "file closed\n"); } if (info->major_fd != 0) { diff -r 967c39d78bc4 -r dfd272ab67e7 libgaim/protocols/qq/send_file.h --- a/libgaim/protocols/qq/send_file.h Mon Oct 23 19:43:45 2006 +0000 +++ b/libgaim/protocols/qq/send_file.h Mon Oct 23 20:21:54 2006 +0000 @@ -40,7 +40,7 @@ union { FILE *dest_fp; guint8 *buffer; - }; + } u; gboolean use_major; } ft_info;