From efdfa50f1e711e5bdd3ec98a3dedea422b3da362 Mon Sep 17 00:00:00 2001 From: RichardHitt Date: Wed, 9 Jan 2013 00:15:08 -0800 Subject: Fix Issue 350 in checksum.c by changing struct stat64 to struct stat --- plugins/checksum/checksum.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'plugins/checksum/checksum.c') diff --git a/plugins/checksum/checksum.c b/plugins/checksum/checksum.c index 492367f6..3cceeb5f 100644 --- a/plugins/checksum/checksum.c +++ b/plugins/checksum/checksum.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -33,9 +34,7 @@ #ifndef snprintf #define snprintf _snprintf #endif -#ifndef stat64 -#define stat64 _stat64 -#endif +#define stat _stat64 #else /* for INT_MAX */ #include @@ -44,8 +43,6 @@ #define _LARGEFILE64_SOURCE #endif -#include - #include "hexchat-plugin.h" #define BUFSIZE 32768 @@ -171,7 +168,7 @@ static int dccrecv_cb (char *word[], void *userdata) { int result; - struct stat64 buffer; /* buffer for storing file info */ + struct stat buffer; /* buffer for storing file info */ char sum[65]; /* buffer for checksum */ char *file; if (hexchat_get_prefs (ph, "dcc_completed_dir", &file, NULL) == 1 && file[0] != 0) @@ -183,7 +180,7 @@ dccrecv_cb (char *word[], void *userdata) file = g_strdup(word[2]); } - result = stat64 (file, &buffer); + result = stat (file, &buffer); if (result == 0) /* stat returns 0 on success */ { if (buffer.st_size <= (unsigned long long) get_limit () * 1048576) @@ -212,10 +209,10 @@ static int dccoffer_cb (char *word[], void *userdata) { int result; - struct stat64 buffer; /* buffer for storing file info */ + struct stat buffer; /* buffer for storing file info */ char sum[65]; /* buffer for checksum */ - result = stat64 (word[3], &buffer); + result = stat (word[3], &buffer); if (result == 0) /* stat returns 0 on success */ { if (buffer.st_size <= (unsigned long long) get_limit () * 1048576) -- cgit 1.4.1